/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/ |
D | ProfileDetailsActionButtonsPreferenceControllerTest.java | 131 when(mMockUserManager.isAdminUser()).thenReturn(true); in onStart_isAdminViewingNonAdmin_makeAdminButtonShown() 145 when(mMockUserManager.isAdminUser()).thenReturn(true); in onStart_isAdminViewingAdmin_makeAdminButtonHidden() 161 when(mMockUserManager.isAdminUser()).thenReturn(true); in onStart_isAdminViewingSelf_makeManageOtherProfilesButtonShown() 179 when(mMockUserManager.isAdminUser()).thenReturn(true); in onStart_isAdminViewingOther_makeManageOtherProfilesButtonHidden() 196 when(mMockUserManager.isAdminUser()).thenReturn(false); in onStart_isNonAdmin_makeManageOtherProfilesButtonHidden() 212 when(mMockUserManager.isAdminUser()).thenReturn(true); in onStart_isOnlyProfile_makeAddAProfileButtonShown() 279 when(mMockUserManager.isAdminUser()).thenReturn(true); in onCreate_hasPreviousDeleteDialog_dialogListenerSet() 306 when(mMockUserManager.isAdminUser()).thenReturn(true); in onMakeAdminButtonClicked_showsConfirmationDialog() 340 when(mMockUserManager.isAdminUser()).thenReturn(true); in onMakeAdminConfirmed_makeProfileAdmin() 358 when(mMockUserManager.isAdminUser()).thenReturn(true); in onMakeAdminConfirmed_goBack() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | ClearAdbKeysPreferenceControllerTest.java | 98 doReturn(false).when(mController).isAdminUser(); in displayPreference_isNotAdminUser_preferenceShouldBeDisabled() 109 doReturn(true).when(mController).isAdminUser(); in handlePreferenceTreeClick_clearAdbKeysPreference_shouldShowWarningDialog() 122 doReturn(true).when(mController).isAdminUser(); in handlePreferenceTreeClick_notClearAdbKeysPreference_shouldReturnFalse() 133 doReturn(true).when(mController).isAdminUser(); in handlePreferenceTreeClick_monkeyUser_shouldReturnFalse() 147 doReturn(true).when(mController).isAdminUser(); in onDeveloperOptionsSwitchEnabled_isAdminUser_shouldEnablePreference() 157 doReturn(false).when(mController).isAdminUser(); in onDeveloperOptionsSwitchEnabled_isNotAdminUser_shouldNotEnablePreference()
|
D | LocalBackupPasswordPreferenceControllerTest.java | 57 doReturn(true).when(mController).isAdminUser(); in updateState_hasBackupPassword_preferenceShouldHavePasswordSetSummary() 70 doReturn(true).when(mController).isAdminUser(); in updateState_noBackupPassword_preferenceShouldHaveNoPasswordSetSummary() 82 doReturn(true).when(mController).isAdminUser(); in updateState_backupManagerIsNull_shouldDisablePreference() 96 doReturn(false).when(mController).isAdminUser(); in updateState_backupManagerIsNotNullAndNotAdminUser_shouldDisablePreference() 109 doReturn(true).when(mController).isAdminUser(); in updateState_backupManagerIsNotNullAndAdminUser_shouldEnablePreference()
|
D | LocalTerminalPreferenceControllerTest.java | 62 when(mUserManager.isAdminUser()).thenReturn(true); in setup() 73 when(mUserManager.isAdminUser()).thenReturn(false); in displayPreference_shouldDisablePreferenceWhenNotAdmin() 125 when(mUserManager.isAdminUser()).thenReturn(false); in onDeveloperOptionsSwitchEnabled_shouldDoNothingWhenNotAdmin()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/development/ |
D | DevelopmentSettingsUtilTest.java | 54 when(mMockUserManager.isAdminUser()).thenReturn(true); in isEnabled_settingsOff_isAdmin_shouldReturnFalse() 64 when(mMockUserManager.isAdminUser()).thenReturn(true); in isEnabled_settingsOn_isAdmin_shouldReturnTrue() 74 when(mMockUserManager.isAdminUser()).thenReturn(false); in isEnabled_settingsOn_notAdmin_shouldReturnFalse() 85 when(mMockUserManager.isAdminUser()).thenReturn(true); in isEnabled_hasDisallowDebuggingRestriction_shouldReturnFalse() 99 when(mMockUserManager.isAdminUser()).thenReturn(true); in isEnabled_doesNotHaveDisallowDebuggingRestriction_shouldReturnTrue()
|
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | DeviceAdminAddPoliciesPreferenceController.java | 60 boolean isAdminUser = mUm.isAdminUser(); in updateState() 63 int descriptionId = isAdminUser ? pi.description : pi.descriptionForSecondaryUsers; in updateState() 64 int labelId = isAdminUser ? pi.label : pi.labelForSecondaryUsers; in updateState()
|
/packages/apps/Settings/src/com/android/settings/development/ |
D | ClearAdbKeysPreferenceController.java | 67 if (mPreference != null && !isAdminUser()) { in displayPreference() 87 if (isAdminUser()) { in onDeveloperOptionsSwitchEnabled() 101 boolean isAdminUser() { in isAdminUser() method in ClearAdbKeysPreferenceController 102 return ((UserManager) mContext.getSystemService(Context.USER_SERVICE)).isAdminUser(); in isAdminUser()
|
D | LocalBackupPasswordPreferenceController.java | 59 preference.setEnabled(isAdminUser() && mBackupManager != null); in updatePasswordSummary() 75 boolean isAdminUser() { in isAdminUser() method in LocalBackupPasswordPreferenceController 76 return mUserManager.isAdminUser(); in isAdminUser()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | NetworkResetRestrictionCheckerTest.java | 56 when(mUserManager.isAdminUser()).thenReturn(false); in testHasRestriction_notAdmin_shouldReturnTrue() 63 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_hasUserRestriction_shouldReturnTrue() 72 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_hasAdminRestriction_shouldReturnTrue() 81 when(mUserManager.isAdminUser()).thenReturn(true); in testHasRestriction_noRestriction_shouldReturnFalse()
|
D | MobileNetworkListFragmentTest.java | 54 when(mUserManager.isAdminUser()).thenReturn(true); in isPageSearchEnabled_adminUser_shouldReturnTrue() 68 when(mUserManager.isAdminUser()).thenReturn(false); in isPageSearchEnabled_nonAdminUser_shouldReturnFalse()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/backup/ |
D | ShadowPrivacySettingsUtils.java | 37 public static boolean isAdminUser(final Context context) { in isAdminUser() method in ShadowPrivacySettingsUtils 46 public static void setIsAdminUser(boolean isAdminUser) { in setIsAdminUser() argument 47 sIsAdminUser = isAdminUser; in setIsAdminUser()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | EmergencyBroadcastPreferenceControllerTest.java | 83 when(mUserManager.isAdminUser()).thenReturn(false); in isAvailable_notAdminUser_shouldReturnFalse() 95 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_hasConfigCellBroadcastRestriction_shouldReturnFalse() 108 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_cellBroadcastAppLinkDisabled_shouldReturnFalse() 120 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_cellBroadcastReceiverDisabled_shouldReturnFalse()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/ |
D | SimLockPreferenceControllerTest.java | 88 when(mUserManager.isAdminUser()).thenReturn(false); in isAvailable_notAdmin_false() 96 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_simIccNotReady_false() 104 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_carrierConfigDisabled_false() 116 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_true()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/ |
D | DefaultPaymentSettingsPreferenceControllerTest.java | 65 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_hasNfc_shouldReturnTrue() 74 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_noNfcAdapter_shouldReturnFalse() 83 when(mUserManager.isAdminUser()).thenReturn(true); in getAvailabilityStatus_NfcIsDisabled_shouldReturnDisabled()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/ |
D | ResetNetworkEntryPreferenceControllerTest.java | 90 when(mMockUserManager.isAdminUser()).thenReturn(false); in getAvailabilityStatus_nonAdminUser_disabledForUser() 97 when(mMockUserManager.isAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_available() 104 when(mMockUserManager.isAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_restricted_disabledForUser()
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | UserHelperTest.java | 119 when(mUserManager.isAdminUser()).thenReturn(false); in testGrantAdminPermissions_nonAdmin() 130 when(mUserManager.isAdminUser()).thenReturn(true); in testGrantAdminPermissions_admin() 142 when(mUserManager.isAdminUser()).thenReturn(true); in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/ |
D | ProfileHelperTest.java | 301 when(mMockUserManager.isAdminUser()).thenReturn(true); in testRemoveUser_isAdmin_canRemoveOtherUsers() 317 when(mMockUserManager.isAdminUser()).thenReturn(false); in testRemoveUser_isNonAdmin_cannotRemoveOtherUsers() 331 when(mMockUserManager.isAdminUser()).thenReturn(true); in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser() 355 when(mMockUserManager.isAdminUser()).thenReturn(true); in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser() 380 when(mMockUserManager.isAdminUser()).thenReturn(false); in testRemoveUser_removeForegroundUser_callsSwitchToGuest() 397 when(mMockUserManager.isAdminUser()).thenReturn(false); in testRemoveUser_removeForegroundUser_switchFails_returnsSetEphemeralResult()
|
/packages/apps/Settings/src/com/android/settings/datausage/ |
D | DataUsageBaseFragment.java | 66 return services.mUserManager.isAdminUser(); in isAdmin() 74 return policy != null && isBandwidthControlEnabled() && services.mUserManager.isAdminUser() in isNetworkPolicyModifiable()
|
/packages/apps/Car/Settings/src/com/android/car/settings/development/ |
D | DevelopmentSettingsUtil.java | 65 boolean isAdmin = userManager.isAdminUser(); in isDevelopmentSettingsEnabled() 92 boolean isAdmin = userManager.isAdminUser(); in showDeveloperOptions()
|
/packages/apps/Settings/src/com/android/settings/backup/ |
D | PrivacySettingsUtils.java | 45 static boolean isAdminUser(final Context context) { in isAdminUser() method in PrivacySettingsUtils 46 return UserManager.get(context).isAdminUser(); in isAdminUser()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/ |
D | BaseEnterpriseTestCase.java | 148 when(mUm.isAdminUser()).thenReturn(true); in mockAdminUser() 152 when(mUm.isAdminUser()).thenReturn(false); in mockNonAdminUser()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | MobileNetworkSettingsTest.java | 120 when(userManager.isAdminUser()).thenReturn(true); in isPageSearchEnabled_adminUser_shouldReturnTrue() 135 when(userManager.isAdminUser()).thenReturn(false); in isPageSearchEnabled_nonAdminUser_shouldReturnFalse()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/deviceadmin/ |
D | DeviceAdminAdd.java | 558 boolean isAdminUser = UserManager.get(this).isAdminUser(); in addDeviceAdminPolicies() 560 int descriptionId = isAdminUser ? pi.description : pi.descriptionForSecondaryUsers; in addDeviceAdminPolicies() 561 int labelId = isAdminUser ? pi.label : pi.labelForSecondaryUsers; in addDeviceAdminPolicies()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | MobileNetworkPreferenceControllerTest.java | 96 when(mUserManager.isAdminUser()).thenReturn(false); in secondaryUser_prefIsNotAvailable() 105 when(mUserManager.isAdminUser()).thenReturn(true); in wifiOnly_prefIsNotAvailable()
|
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/ |
D | ProfileDetailsActionButtonsPreferenceController.java | 129 boolean shouldShowAddProfile = mUserManager.isAdminUser() in onStartInternal() 134 || mUserManager.isAdminUser() && mProfileHelper.isCurrentProcessUser(getUserInfo()) in onStartInternal()
|