Home
last modified time | relevance | path

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

1234

/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DCarUserManagerHelperTest.java354 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserCallsCreateUser()
363 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserReturnsNullUsers()
372 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserReturnsCreatedUser()
383 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserWithDefaultUserNameCallsCreateUser()
392 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserWithDefaultUserNameReturnsNullUsers()
401 doReturn(true).when(mUserManager).isAdminUser(); in testCreateNewAdminUserWithDefaultUserNameReturnsCreatedUser()
417 doReturn(true).when(mUserManager).isAdminUser(); in testAdminsCanCreateAdmins()
430 doReturn(false).when(mUserManager).isAdminUser(); // Current user non-admin. in testNonAdminsCanNotCreateAdmins()
476 doReturn(true).when(mUserManager).isAdminUser(); in testAdminsCanRemoveOtherUsers()
486 doReturn(false).when(mUserManager).isAdminUser(); in testNonAdminsCanNotRemoveOtherUsers()
[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/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/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.java55 when(mUserManager.isAdminUser()).thenReturn(true); in isPageSearchEnabled_adminUser_shouldReturnTrue()
69 when(mUserManager.isAdminUser()).thenReturn(false); in isPageSearchEnabled_nonAdminUser_shouldReturnFalse()
/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.java86 when(mUserManager.isAdminUser()).thenReturn(false); in isAvailable_notAdmin_false()
94 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_simIccNotReady_false()
102 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_carrierConfigDisabled_false()
114 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_true()
/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/applications/specialaccess/
DDefaultPaymentSettingsPreferenceControllerTest.java65 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_hasNfc_shouldReturnTrue()
74 when(mUserManager.isAdminUser()).thenReturn(true); in isAvailable_noNfcAdapter_shouldReturnFalse()
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/
DDataUsageBaseFragment.java66 return services.mUserManager.isAdminUser(); in isAdmin()
74 return policy != null && isBandwidthControlEnabled() && services.mUserManager.isAdminUser() in isNetworkPolicyModifiable()
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/backup/
DPrivacySettingsUtils.java45 static boolean isAdminUser(final Context context) { in isAdminUser() method in PrivacySettingsUtils
46 return UserManager.get(context).isAdminUser(); in isAdminUser()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/deviceadmin/
DDeviceAdminAdd.java669 boolean isAdminUser = UserManager.get(this).isAdminUser(); in addDeviceAdminPolicies()
671 int descriptionId = isAdminUser ? pi.description : pi.descriptionForSecondaryUsers; in addDeviceAdminPolicies()
672 int labelId = isAdminUser ? pi.label : pi.labelForSecondaryUsers; in addDeviceAdminPolicies()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/
DMobileNetworkSettingsTest.java146 when(userManager.isAdminUser()).thenReturn(true); in isPageSearchEnabled_adminUser_shouldReturnTrue()
161 when(userManager.isAdminUser()).thenReturn(false); in isPageSearchEnabled_nonAdminUser_shouldReturnFalse()
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/deviceadmin/
DDeviceAdminAdd.java713 boolean isAdminUser = UserManager.get(this).isAdminUser(); in addDeviceAdminPolicies()
715 int descriptionId = isAdminUser ? pi.description : pi.descriptionForSecondaryUsers; in addDeviceAdminPolicies()
716 int labelId = isAdminUser ? pi.label : pi.labelForSecondaryUsers; in addDeviceAdminPolicies()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/
DAboutFragment.java180 if (mUm.isAdminUser()) { in onCreatePreferences()
278 if (!mUm.isAdminUser()) { in onPreferenceTreeClick()
/packages/apps/Settings/src/com/android/settings/
DTestingSettings.java34 if (!um.isAdminUser()) { in onCreate()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DTestingSettings.java34 if (!um.isAdminUser()) { in onCreate()
/packages/apps/Settings/src/com/android/settings/system/
DFactoryResetPreferenceController.java41 return mUm.isAdminUser() || Utils.isDemoUser(mContext); in isAvailable()

1234