Home
last modified time | relevance | path

Searched refs:isAdminUser (Results 1 – 25 of 98) sorted by relevance

1234

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DProfileDetailsActionButtonsPreferenceControllerTest.java131 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/
DClearAdbKeysPreferenceControllerTest.java98 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()
DLocalBackupPasswordPreferenceControllerTest.java57 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()
DLocalTerminalPreferenceControllerTest.java62 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/
DDevelopmentSettingsUtilTest.java54 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/
DDeviceAdminAddPoliciesPreferenceController.java60 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/
DClearAdbKeysPreferenceController.java67 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()
DLocalBackupPasswordPreferenceController.java59 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/
DNetworkResetRestrictionCheckerTest.java56 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()
DMobileNetworkListFragmentTest.java54 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/
DShadowPrivacySettingsUtils.java37 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/
DEmergencyBroadcastPreferenceControllerTest.java83 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/
DSimLockPreferenceControllerTest.java88 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/
DDefaultPaymentSettingsPreferenceControllerTest.java65 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/
DResetNetworkEntryPreferenceControllerTest.java90 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/
DUserHelperTest.java119 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/
DProfileHelperTest.java301 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/
DDataUsageBaseFragment.java66 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/
DDevelopmentSettingsUtil.java65 boolean isAdmin = userManager.isAdminUser(); in isDevelopmentSettingsEnabled()
92 boolean isAdmin = userManager.isAdminUser(); in showDeveloperOptions()
/packages/apps/Settings/src/com/android/settings/backup/
DPrivacySettingsUtils.java45 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/
DBaseEnterpriseTestCase.java148 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/
DMobileNetworkSettingsTest.java120 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/
DDeviceAdminAdd.java558 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/
DMobileNetworkPreferenceControllerTest.java96 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/
DProfileDetailsActionButtonsPreferenceController.java129 boolean shouldShowAddProfile = mUserManager.isAdminUser() in onStartInternal()
134 || mUserManager.isAdminUser() && mProfileHelper.isCurrentProcessUser(getUserInfo()) in onStartInternal()

1234