File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/android/aidl/example-service Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,15 @@ _birthday_service/Android.bp_:
23
23
24
24
- Point out the path to the generated ` IBirthdayService ` trait, and explain why
25
25
each of the segments is necessary.
26
+ - Note that ` wishHappyBirthday ` and other AIDL IPC methods take ` &self ` (instead
27
+ of ` &mut self ` ).
28
+ - This is necessary because binder responds to incoming requests on a thread
29
+ pool, allowing for multiple requests to be processed in parallel. This
30
+ requires that the service methods only get a shared reference to ` self ` .
31
+ - Any state that needs to be modified by the service will have to be put in
32
+ something like a ` Mutex ` to allow for safe mutation.
33
+ - The correct approach for managing service state depends heavily on the
34
+ details of your service.
26
35
- TODO: What does the ` binder::Interface ` trait do? Are there methods to
27
36
override? Where source?
28
37
You can’t perform that action at this time.
0 commit comments