File tree Expand file tree Collapse file tree
binder/src/main/java/io/grpc/binder/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,11 +304,10 @@ public ServiceInfo resolve() throws StatusException {
304304 PackageManager packageManager = sourceContext .getPackageManager ();
305305 int flags = 0 ;
306306 if (Build .VERSION .SDK_INT >= 29 ) {
307- // Use the current locked/unlocked state of 'targetUserHandle' to filter <service> matches.
308- // Callers want to resolve 'bindIntent' the same way a follow-up call to bind() will. And
309- // if the target user is locked, bindService() ignores matches that can't presently be created
310- // due to directBootAware=false. Of course this filter races against a concurrent unlock, but
311- // that's no different than the other resolve/connect races our callers must already handle.
307+ // Filter out non-'directBootAware' <service>s when 'targetUserHandle' is locked. Here's why:
308+ // Callers want 'bindIntent' to #resolve() to the same thing a follow-up call to #bind() will.
309+ // But bindService() *always* ignores services that can't presently be created for lack of
310+ // 'directBootAware'-ness. This flag explicitly tells resolveService() to act the same way.
312311 flags |= PackageManager .MATCH_DIRECT_BOOT_AUTO ;
313312 }
314313 ResolveInfo resolveInfo =
You can’t perform that action at this time.
0 commit comments