Skip to content

binder: Let servers load their SecurityPolicy asynchronously#12874

Open
jdcormie wants to merge 1 commit into
grpc:masterfrom
jdcormie:async-from-future
Open

binder: Let servers load their SecurityPolicy asynchronously#12874
jdcormie wants to merge 1 commit into
grpc:masterfrom
jdcormie:async-from-future

Conversation

@jdcormie

Copy link
Copy Markdown
Member

Android IPC servers can't defer "listening" while some slow or async initialization process completes. Instead, Android tells a server to initialize itself just-in-time for the first client connection. And this instruction arrives as a callback to Service#onCreate() then Service#onBind() on the app's main thread, where blocking to load a security policy would risk an "Application Not Responding" (ANR) error.

For demonstration of need see CL/918859271.

Android IPC servers can't defer "listening" while some slow or async
initialization process completes. Instead, Android *tells* a server to
initialize itself just-in-time for the first client connection. And this
instruction arrives as a callback to Service#onCreate() then
Service#onBind() on the app's main thread, where blocking to load a
security policy would risk an "Application Not Responding" (ANR) error.
@jdcormie

Copy link
Copy Markdown
Member Author

@groakley I can't seem to assign this to you but as creator of the existing composite security policies could you please review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant