/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | CarUserManagerHelperTest.java | 354 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/ |
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/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/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 | 55 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/ |
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 | 86 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/ |
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/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()
|
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/ |
D | DataUsageBaseFragment.java | 66 return services.mUserManager.isAdminUser(); in isAdmin() 74 return policy != null && isBandwidthControlEnabled() && services.mUserManager.isAdminUser() in isNetworkPolicyModifiable()
|
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/deviceadmin/ |
D | DeviceAdminAdd.java | 669 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/ |
D | MobileNetworkSettingsTest.java | 146 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/ |
D | DeviceAdminAdd.java | 713 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/ |
D | AboutFragment.java | 180 if (mUm.isAdminUser()) { in onCreatePreferences() 278 if (!mUm.isAdminUser()) { in onPreferenceTreeClick()
|
/packages/apps/Settings/src/com/android/settings/ |
D | TestingSettings.java | 34 if (!um.isAdminUser()) { in onCreate()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/ |
D | TestingSettings.java | 34 if (!um.isAdminUser()) { in onCreate()
|
/packages/apps/Settings/src/com/android/settings/system/ |
D | FactoryResetPreferenceController.java | 41 return mUm.isAdminUser() || Utils.isDemoUser(mContext); in isAvailable()
|