Loading core/java/android/app/ActivityManagerInternal.java +2 −2 Original line number Diff line number Diff line Loading @@ -537,8 +537,8 @@ public abstract class ActivityManagerInternal { /** * Returns whether the given user requires credential entry at this time. This is used to * intercept activity launches for locked work apps due to work challenge being triggered or * when the profile user is yet to be unlocked. * intercept activity launches for apps corresponding to locked profiles due to separate * challenge being triggered or when the profile user is yet to be unlocked. */ public abstract boolean shouldConfirmCredentials(@UserIdInt int userId); Loading services/core/java/com/android/server/am/UserController.java +2 −2 Original line number Diff line number Diff line Loading @@ -3050,8 +3050,8 @@ class UserController implements Handler.Callback { /** * Returns whether the given user requires credential entry at this time. This is used to * intercept activity launches for locked work apps due to work challenge being triggered * or when the profile user is yet to be unlocked. * intercept activity launches for apps corresponding to locked profiles due to separate * challenge being triggered or when the profile user is yet to be unlocked. */ protected boolean shouldConfirmCredentials(@UserIdInt int userId) { if (getStartedUserState(userId) == null) { Loading services/core/java/com/android/server/wm/ActivityStartInterceptor.java +2 −2 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ class ActivityStartInterceptor { // before issuing the work challenge. return true; } if (interceptLockedManagedProfileIfNeeded()) { if (interceptLockedProfileIfNeeded()) { return true; } if (interceptHomeIfNeeded()) { Loading Loading @@ -378,7 +378,7 @@ class ActivityStartInterceptor { return true; } private boolean interceptLockedManagedProfileIfNeeded() { private boolean interceptLockedProfileIfNeeded() { final Intent interceptingIntent = interceptWithConfirmCredentialsIfNeeded(mAInfo, mUserId); if (interceptingIntent == null) { return false; Loading services/core/java/com/android/server/wm/ActivityStarter.java +35 −24 Original line number Diff line number Diff line Loading @@ -579,11 +579,33 @@ class ActivityStarter { computeResolveFilterUid(callingUid, realCallingUid, filterCallingUid), realCallingPid); if (resolveInfo == null) { // Special case for profiles: If attempting to launch non-crypto aware app in a // locked profile or launch an app in a profile that is stopped by quiet mode from // an unlocked parent, allow it to resolve as user will be sent via confirm // credentials to unlock the profile. resolveInfo = resolveIntentForLockedOrStoppedProfiles(supervisor); } // Collect information about the target of the Intent. activityInfo = supervisor.resolveActivity(intent, resolveInfo, startFlags, profilerInfo); // Carefully collect grants without holding lock if (activityInfo != null) { intentGrants = supervisor.mService.mUgmInternal.checkGrantUriPermissionFromIntent( intent, resolvedCallingUid, activityInfo.applicationInfo.packageName, UserHandle.getUserId(activityInfo.applicationInfo.uid)); } } /** * Resolve intent for locked or stopped profiles if the parent profile is unlocking or * unlocked. */ ResolveInfo resolveIntentForLockedOrStoppedProfiles( ActivityTaskSupervisor supervisor) { final UserInfo userInfo = supervisor.getUserInfo(userId); if (userInfo != null && userInfo.isManagedProfile()) { // Special case for managed profiles, if attempting to launch non-cryto aware // app in a locked managed profile from an unlocked parent allow it to resolve // as user will be sent via confirm credentials to unlock the profile. if (userInfo != null && userInfo.isProfile()) { final UserManager userManager = UserManager.get(supervisor.mService.mContext); boolean profileLockedAndParentUnlockingOrUnlocked = false; final long token = Binder.clearCallingIdentity(); Loading @@ -596,25 +618,14 @@ class ActivityStarter { Binder.restoreCallingIdentity(token); } if (profileLockedAndParentUnlockingOrUnlocked) { resolveInfo = supervisor.resolveIntent(intent, resolvedType, userId, return supervisor.resolveIntent(intent, resolvedType, userId, PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, computeResolveFilterUid(callingUid, realCallingUid, filterCallingUid), realCallingPid); } } } // Collect information about the target of the Intent. activityInfo = supervisor.resolveActivity(intent, resolveInfo, startFlags, profilerInfo); // Carefully collect grants without holding lock if (activityInfo != null) { intentGrants = supervisor.mService.mUgmInternal.checkGrantUriPermissionFromIntent( intent, resolvedCallingUid, activityInfo.applicationInfo.packageName, UserHandle.getUserId(activityInfo.applicationInfo.uid)); } return null; } } Loading Loading
core/java/android/app/ActivityManagerInternal.java +2 −2 Original line number Diff line number Diff line Loading @@ -537,8 +537,8 @@ public abstract class ActivityManagerInternal { /** * Returns whether the given user requires credential entry at this time. This is used to * intercept activity launches for locked work apps due to work challenge being triggered or * when the profile user is yet to be unlocked. * intercept activity launches for apps corresponding to locked profiles due to separate * challenge being triggered or when the profile user is yet to be unlocked. */ public abstract boolean shouldConfirmCredentials(@UserIdInt int userId); Loading
services/core/java/com/android/server/am/UserController.java +2 −2 Original line number Diff line number Diff line Loading @@ -3050,8 +3050,8 @@ class UserController implements Handler.Callback { /** * Returns whether the given user requires credential entry at this time. This is used to * intercept activity launches for locked work apps due to work challenge being triggered * or when the profile user is yet to be unlocked. * intercept activity launches for apps corresponding to locked profiles due to separate * challenge being triggered or when the profile user is yet to be unlocked. */ protected boolean shouldConfirmCredentials(@UserIdInt int userId) { if (getStartedUserState(userId) == null) { Loading
services/core/java/com/android/server/wm/ActivityStartInterceptor.java +2 −2 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ class ActivityStartInterceptor { // before issuing the work challenge. return true; } if (interceptLockedManagedProfileIfNeeded()) { if (interceptLockedProfileIfNeeded()) { return true; } if (interceptHomeIfNeeded()) { Loading Loading @@ -378,7 +378,7 @@ class ActivityStartInterceptor { return true; } private boolean interceptLockedManagedProfileIfNeeded() { private boolean interceptLockedProfileIfNeeded() { final Intent interceptingIntent = interceptWithConfirmCredentialsIfNeeded(mAInfo, mUserId); if (interceptingIntent == null) { return false; Loading
services/core/java/com/android/server/wm/ActivityStarter.java +35 −24 Original line number Diff line number Diff line Loading @@ -579,11 +579,33 @@ class ActivityStarter { computeResolveFilterUid(callingUid, realCallingUid, filterCallingUid), realCallingPid); if (resolveInfo == null) { // Special case for profiles: If attempting to launch non-crypto aware app in a // locked profile or launch an app in a profile that is stopped by quiet mode from // an unlocked parent, allow it to resolve as user will be sent via confirm // credentials to unlock the profile. resolveInfo = resolveIntentForLockedOrStoppedProfiles(supervisor); } // Collect information about the target of the Intent. activityInfo = supervisor.resolveActivity(intent, resolveInfo, startFlags, profilerInfo); // Carefully collect grants without holding lock if (activityInfo != null) { intentGrants = supervisor.mService.mUgmInternal.checkGrantUriPermissionFromIntent( intent, resolvedCallingUid, activityInfo.applicationInfo.packageName, UserHandle.getUserId(activityInfo.applicationInfo.uid)); } } /** * Resolve intent for locked or stopped profiles if the parent profile is unlocking or * unlocked. */ ResolveInfo resolveIntentForLockedOrStoppedProfiles( ActivityTaskSupervisor supervisor) { final UserInfo userInfo = supervisor.getUserInfo(userId); if (userInfo != null && userInfo.isManagedProfile()) { // Special case for managed profiles, if attempting to launch non-cryto aware // app in a locked managed profile from an unlocked parent allow it to resolve // as user will be sent via confirm credentials to unlock the profile. if (userInfo != null && userInfo.isProfile()) { final UserManager userManager = UserManager.get(supervisor.mService.mContext); boolean profileLockedAndParentUnlockingOrUnlocked = false; final long token = Binder.clearCallingIdentity(); Loading @@ -596,25 +618,14 @@ class ActivityStarter { Binder.restoreCallingIdentity(token); } if (profileLockedAndParentUnlockingOrUnlocked) { resolveInfo = supervisor.resolveIntent(intent, resolvedType, userId, return supervisor.resolveIntent(intent, resolvedType, userId, PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, computeResolveFilterUid(callingUid, realCallingUid, filterCallingUid), realCallingPid); } } } // Collect information about the target of the Intent. activityInfo = supervisor.resolveActivity(intent, resolveInfo, startFlags, profilerInfo); // Carefully collect grants without holding lock if (activityInfo != null) { intentGrants = supervisor.mService.mUgmInternal.checkGrantUriPermissionFromIntent( intent, resolvedCallingUid, activityInfo.applicationInfo.packageName, UserHandle.getUserId(activityInfo.applicationInfo.uid)); } return null; } } Loading