/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/ |
H A D | AccountPreferenceControllerTest.java | 113 when(mUserManager.isManagedProfile()).thenReturn(true); in onResume_managedProfile_shouldNotAddAccountCategory() 122 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_linkedUser_shouldAddOneAccountCategory() 135 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfile_shouldAddOneAccountCategory() 149 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_twoProfiles_shouldAddTwoAccountCategory() 163 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_noProfileChange_shouldNotAddOrRemoveAccountCategory() 179 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneNewProfile_shouldAddOneAccountCategory() 197 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfileRemoved_shouldRemoveOneAccountCategory() 213 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfile_shouldSetAccountTitleWithUserName() 230 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_noPreferenceScreen_shouldNotCrash() 248 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_noPreferenceManager_shouldNotCrash() [all …]
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
H A D | AutoSyncWorkDataPreferenceControllerTest.java | 66 when(mUserManager.isManagedProfile()).thenReturn(true); in checkIsAvailable_managedProfile_shouldNotDisplay() 73 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_linkedUser_shouldNotDisplay() 81 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_singleUserProfile_shouldNotDisplay() 93 when(mUserManager.isManagedProfile()).thenReturn(false); in checkIsAvailable_null_workProfileUserHandle_shouldNotDisplay() 108 when(mUserManager.isManagedProfile()).thenReturn(false); in multipleProfile_shouldInitWithWorkProfileUserHandle()
|
H A D | AutoSyncPersonalDataPreferenceControllerTest.java | 72 when(mUserManager.isManagedProfile()).thenReturn(true); in displayPref_managedProfile_shouldNotDisplay() 81 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_linkedUser_shouldNotDisplay() 93 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_oneProfile_shouldNotDisplay() 107 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_prefAvailable_shouldDisplay()
|
H A D | AutoSyncDataPreferenceControllerTest.java | 77 when(mUserManager.isManagedProfile()).thenReturn(true); in displayPref_managedProfile_shouldNotDisplay() 86 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_linkedUser_shouldDisplay() 98 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_oneProfile_shouldDisplay() 112 when(mUserManager.isManagedProfile()).thenReturn(false); in displayPref_moreThanOneProfile_shouldNotDisplay()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
H A D | ExternalSourceDetailPreferenceControllerTest.java | 68 when(mUserManager.isManagedProfile()).thenReturn(true); in getAvailabilityStatus_managedProfile_shouldReturnDisabled() 76 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_notPotentialAppSource_shouldReturnDisabled() 85 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_isPotentialAppSource_shouldReturnAvailable() 109 when(mUserManager.isManagedProfile()).thenReturn(false); in isPotentialAppSource_nullPackageInfo_shouldNotCrash()
|
H A D | WriteSystemSettingsPreferenceControllerTest.java | 71 when(mUserManager.isManagedProfile()).thenReturn(true); in getAvailabilityStatus_managedProfile_shouldReturnDisabled() 79 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_noPermissionRequested_shouldReturnDisabled() 88 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_noWriteSettingsPermission_shouldReturnDisabled() 99 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_hasWriteSettingsPermission_shouldReturnAvailable()
|
H A D | DrawOverlayDetailPreferenceControllerTest.java | 71 when(mUserManager.isManagedProfile()).thenReturn(true); in getAvailabilityStatus_managedProfile_shouldReturnDisabled() 79 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_noPermissionRequested_shouldReturnDisabled() 88 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_noSystemAlertWindowPermission_shouldReturnDisabled() 99 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_hasSystemAlertWindowPermission_shouldReturnAvailable()
|
H A D | AppInstallerInfoPreferenceControllerTest.java | 91 when(mUserManager.isManagedProfile()).thenReturn(true); in getAvailabilityStatus_managedProfile_shouldReturnDisabled() 99 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_noAppLabel_shouldReturnDisabled() 109 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_hasAppLabel_shouldReturnAvailable() 164 when(mUserManager.isManagedProfile()).thenReturn(false); in getAvailabilityStatus_isMainlineModule_shouldReturnDisabled()
|
/aosp12/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
H A D | AdminRestrictedPermissionsUtils.java | 73 if (um.isManagedProfile(userId) in mayAdminGrantPermission() 88 boolean canAdminGrantSensorsPermissions, boolean isManagedProfile) { in mayAdminGrantPermission() argument 92 if (isManagedProfile && MANAGED_PROFILE_OWNER_RESTRICTED_PERMISSIONS.contains(permission)) { in mayAdminGrantPermission()
|
/aosp12/frameworks/base/services/core/java/com/android/server/ |
H A D | SystemService.java | 155 mManagedProfile = userInfo.isManagedProfile(); in TargetUser() 173 public boolean isManagedProfile() { in isManagedProfile() method in SystemService.TargetUser 214 if (!isFull() && !isManagedProfile()) return; in dump() 221 if (isManagedProfile()) { in dump()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/theme/ |
H A D | ThemeOverlayController.java | 191 boolean isManagedProfile = mUserManager.isManagedProfile(newUser); 192 if (!mDeviceProvisionedController.isCurrentUserSetup() && isManagedProfile) { 194 + "Deferring... Managed profile? " + isManagedProfile); 316 boolean isManagedProfile = mUserManager.isManagedProfile( 319 if (!mDeviceProvisionedController.isCurrentUserSetup() && isManagedProfile) { 321 + " was received. Deferring... Managed profile? " + isManagedProfile); 615 if (userInfo.isManagedProfile()) { in updateThemeOverlays()
|
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/ |
H A D | UserUtil.java | 34 public static boolean isManagedProfile(Context context, UserHandle userHandle) { in isManagedProfile() method in UserUtil 36 return userInfo != null && userInfo.isManagedProfile(); in isManagedProfile()
|
/aosp12/frameworks/base/core/java/android/content/pm/ |
H A D | CrossProfileApps.java | 241 final int stringRes = mUserManager.isManagedProfile(userHandle.getIdentifier()) in getProfileSwitchingLabel() 263 final boolean isManagedProfile = in getProfileSwitchingIconDrawable() 264 mUserManager.isManagedProfile(userHandle.getIdentifier()); in getProfileSwitchingIconDrawable() 265 if (isManagedProfile) { in getProfileSwitchingIconDrawable()
|
/aosp12/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
H A D | UserIdManagerTest.java | 58 when(mockUserManager.isManagedProfile(managedUser1.getIdentifier())).thenReturn(true); in setUp() 59 when(mockUserManager.isManagedProfile(systemUser.getIdentifier())).thenReturn(false); in setUp() 60 when(mockUserManager.isManagedProfile(nonManagedUser1.getIdentifier())).thenReturn(false); in setUp() 61 when(mockUserManager.isManagedProfile(nonManagedUser2.getIdentifier())).thenReturn(false); in setUp()
|
/aosp12/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/utils/ |
H A D | UserUtils.java | 48 return userManager.isManagedProfile(user.getIdentifier()); in isWorkProfile() 71 if (!userManager.isManagedProfile(profile.getIdentifier())) { in getWorkProfile()
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/ |
H A D | LockscreenSmartspaceControllerTest.kt | 136 mockUserInfo(userHandlePrimary, isManagedProfile = false), 137 mockUserInfo(userHandleManaged, isManagedProfile = true), 138 mockUserInfo(userHandleSecondary, isManagedProfile = false) 510 private fun mockUserInfo(userHandle: UserHandle, isManagedProfile: Boolean): UserInfo { 513 `when`(userInfo.isManagedProfile).thenReturn(isManagedProfile)
|
/aosp12/packages/apps/Settings/src/com/android/settings/notification/ |
H A D | RedactionInterstitial.java | 90 UserManager.get(ctx).isManagedProfile(userId) in createStartIntent() 126 if (UserManager.get(getContext()).isManagedProfile(mUserId)) { in onViewCreated() 182 final boolean managedProfile = UserManager.get(getContext()).isManagedProfile(mUserId); in loadFromSettings()
|
/aosp12/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/user/ |
H A D | TvUserManager.java | 121 public boolean isManagedProfile() { in isManagedProfile() method in TvUserManager 122 return mUserManager.isManagedProfile(mUserId); in isManagedProfile()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/ |
H A D | Utils.java | 105 static boolean isManagedProfile(Context context, int userId) { in isManagedProfile() method in Utils 107 return userManager.isManagedProfile(userId); in isManagedProfile()
|
H A D | AuthCredentialView.java | 225 final boolean isManagedProfile = Utils.isManagedProfile(mContext, mEffectiveUserId); in onAttachedToWindow() 227 if (isManagedProfile) { in onAttachedToWindow() 400 } else if (userToBeWiped.isManagedProfile()) { in getUserTypeForWipe()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/content/pm/ |
H A D | CrossProfileAppsTest.java | 89 when(mUserManager.isManagedProfile(PERSONAL_PROFILE.getIdentifier())).thenReturn(false); in initUsers() 90 when(mUserManager.isManagedProfile(MANAGED_PROFILE.getIdentifier())).thenReturn(true); in initUsers()
|
/aosp12/packages/apps/Settings/src/com/android/settings/applications/specialaccess/deviceadmin/ |
H A D | DeviceAdminAdd.java | 420 } else if (isManagedProfile(mDeviceAdmin) in onCreate() 470 if (isManagedProfile(mDeviceAdmin) in showPolicyTransparencyDialogIfRequired() 655 final boolean isManagedProfile = isManagedProfile(mDeviceAdmin); in updateInterface() 656 if (isProfileOwner && isManagedProfile) { in updateInterface() 793 private boolean isManagedProfile(DeviceAdminInfo adminInfo) { in isManagedProfile() method in DeviceAdminAdd 797 return info != null ? info.isManagedProfile() : false; in isManagedProfile()
|
/aosp12/packages/apps/DocumentsUI/src/com/android/documentsui/ |
H A D | UserIdManager.java | 181 && userManager.isManagedProfile(userHandle.getIdentifier())) { in getUserIdsInternal() 191 } else if (mCurrentUser.isManagedProfile(userManager)) { in getUserIdsInternal()
|
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/deviceadmin/ |
H A D | DeviceAdminAdd.java | 471 final boolean isManagedProfile = isManagedProfile(mDeviceAdmin); in updateInterface() 472 if (isProfileOwner && isManagedProfile) { in updateInterface() 600 private boolean isManagedProfile(DeviceAdminInfo adminInfo) { in isManagedProfile() method in DeviceAdminAdd 604 return info != null ? info.isManagedProfile() : false; in isManagedProfile()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/ |
H A D | SecondaryUserControllerTest.java | 130 when(secondaryUser.isManagedProfile()).thenReturn(false); in getSecondaryUserControllers_notWorkProfile_addSecondaryUserController() 149 when(secondaryUser.isManagedProfile()).thenReturn(true); in getSecondaryUserControllers_workProfile_addNoSecondaryUserController() 168 when(secondaryUser.isManagedProfile()).thenReturn(false); in getSecondaryUserControllers_notWorkProfileWorkProfileOnly_addNoSecondController()
|