Home
last modified time | relevance | path

Searched refs:USER_SYSTEM (Results 1 – 25 of 222) sorted by relevance

123456789

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationHistoryManagerTest.java19 import static android.os.UserHandle.USER_SYSTEM;
97 userSystem.id = USER_SYSTEM; in setUp()
129 assertThat(mHistoryManager.doesHistoryExistForUser(USER_SYSTEM)).isFalse(); in testOnUserUnlocked()
130 assertThat(mHistoryManager.isUserUnlocked(USER_SYSTEM)).isFalse(); in testOnUserUnlocked()
131 mHistoryManager.onUserUnlocked(USER_SYSTEM); in testOnUserUnlocked()
132 assertThat(mHistoryManager.doesHistoryExistForUser(USER_SYSTEM)).isTrue(); in testOnUserUnlocked()
133 assertThat(mHistoryManager.isUserUnlocked(USER_SYSTEM)).isTrue(); in testOnUserUnlocked()
140 mHistoryManager.onUserUnlocked(USER_SYSTEM); in testOnUserUnlocked_historyDisabled()
141 assertThat(mHistoryManager.doesHistoryExistForUser(USER_SYSTEM)).isTrue(); in testOnUserUnlocked_historyDisabled()
143 mHistoryManager.onUserStopped(USER_SYSTEM); in testOnUserUnlocked_historyDisabled()
[all …]
DSnoozeHelperTest.java256 UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey())); in testSnoozeForTime()
266 UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey()));
276 UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey()));
278 UserHandle.USER_SYSTEM, r2.getSbn().getPackageName(), r2.getKey()));
280 mSnoozeHelper.cancel(UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), "one", 1);
284 UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey()));
286 UserHandle.USER_SYSTEM, r2.getSbn().getPackageName(), r2.getKey()));
298 UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey()));
300 UserHandle.USER_SYSTEM, r2.getSbn().getPackageName(), r2.getKey()));
304 mSnoozeHelper.cancel(UserHandle.USER_SYSTEM, false);
[all …]
DArchiveTest.java19 import static android.os.UserHandle.USER_SYSTEM;
54 mArchive.updateHistoryEnabled(USER_SYSTEM, true); in setUp()
73 UserHandle.of(i % 2 ==0 ? USER_SYSTEM : USER_CURRENT)); in testRecordAndRead()
89 StatusBarNotification sbn = getNotification("pkg" + i, i, UserHandle.of(USER_SYSTEM)); in testRecordAndRead_overLimit()
109 UserHandle.of(i % 2 ==0 ? USER_SYSTEM : USER_CURRENT)); in testDoesNotRecordIfHistoryDisabled()
129 UserHandle.of(i % 2 ==0 ? USER_SYSTEM : USER_CURRENT)); in testRemovesEntriesWhenHistoryDisabled()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DKeyguardDisableHandlerTest.java23 import static android.os.UserHandle.USER_SYSTEM;
108 mKeyguardDisable.disableKeyguard(new Binder(), "Tag", FIRST_APPLICATION_UID, USER_SYSTEM); in disable_fromApp_disables()
122 mKeyguardDisable.disableKeyguard(createLockTaskToken(), "Tag", SYSTEM_UID, USER_SYSTEM); in disable_fromSystem_LockTask_disables() local
129 mKeyguardDisable.disableKeyguard(new Binder(), "Tag", SYSTEM_UID, USER_SYSTEM); in disable_fromSystem_genericToken_fails()
140 mKeyguardDisable.disableKeyguard(new Binder(), "Tag", NFC_UID, USER_SYSTEM); in disable_fromNonApp_genericToken_fails()
150 configureIsSecure(true, USER_SYSTEM); in disable_fromApp_secure_staysEnabled()
151 mKeyguardDisable.disableKeyguard(new Binder(), "Tag", FIRST_APPLICATION_UID, USER_SYSTEM); in disable_fromApp_secure_staysEnabled()
157 configureDpmRequiresPassword(true, USER_SYSTEM); in disable_fromApp_dpmRequiresPassword_staysEnabled()
158 mKeyguardDisable.disableKeyguard(new Binder(), "Tag", FIRST_APPLICATION_UID, USER_SYSTEM); in disable_fromApp_dpmRequiresPassword_staysEnabled()
164 configureIsSecure(true, USER_SYSTEM); in disable_fromSystem_LockTask_secure_disables()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DBackupManagerServiceTest.java79 private static final int NON_USER_SYSTEM = UserHandle.USER_SYSTEM + 1;
80 private static final int UNSTARTED_NON_USER_SYSTEM = UserHandle.USER_SYSTEM + 2;
107 mUserId = UserHandle.USER_SYSTEM; in setUp()
110 mUserServices.append(UserHandle.USER_SYSTEM, mUserBackupManagerService); in setUp()
113 when(mUserManagerMock.getUserInfo(UserHandle.USER_SYSTEM)).thenReturn(mUserInfoMock); in setUp()
117 BackupManagerServiceTestable.sCallingUserId = UserHandle.USER_SYSTEM; in setUp()
159 assertTrue(mService.isBackupServiceActive(UserHandle.USER_SYSTEM)); in testIsBackupServiceActive_whenBackupsNotDisabledAndSuppressFileDoesNotExist()
183 service.onUnlockUser(UserHandle.USER_SYSTEM); in testOnUnlockUser_forSystemUserWhenBackupsDisabled_doesNotStartUser()
187 assertNull(service.getUserService(UserHandle.USER_SYSTEM)); in testOnUnlockUser_forSystemUserWhenBackupsDisabled_doesNotStartUser()
211 backupManagerService.setBackupServiceActive(UserHandle.USER_SYSTEM, true); in testIsBackupServiceActive_forSystemUserWhenBackupDisabled_returnsTrue()
[all …]
/frameworks/base/packages/Shell/tests/src/com/android/shell/
DBugreportProgressServiceTest.java115 list(UserHandle.of(UserHandle.USER_SYSTEM))); in findSendToAccount_noWorkProfile()
118 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
127 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
138 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
149 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
160 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
178 list(UserHandle.of(UserHandle.USER_SYSTEM), UserHandle.of(10))); in findSendToAccount_withWorkProfile_noAccounts()
185 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
194 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
205 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceCreateProfileTest.java74 UserHandle.USER_SYSTEM, users.get(0).id); in setup()
91 mUserManagerService.getProfiles(UserHandle.USER_SYSTEM, /*excludeDying*/ false); in testGetProfiles()
94 UserHandle.USER_SYSTEM, users.get(0).id); in testGetProfiles()
116 int[] users = mUserManagerService.getProfileIds(UserHandle.USER_SYSTEM, userType1, false); in testGetProfileIds_specifyType()
134 mUserManagerService.getFreeProfileBadgeLU(UserHandle.USER_SYSTEM, in testProfileBadge()
147 mUserManagerService.getFreeProfileBadgeLU(UserHandle.USER_SYSTEM, in testProfileBadge()
155 mUserManagerService.getFreeProfileBadgeLU(UserHandle.USER_SYSTEM, in testProfileBadge()
170 int nextBadge = mUserManagerService.getFreeProfileBadgeLU(UserHandle.USER_SYSTEM, in testProfileBadgeUnique()
207 if (!mUserManagerService.canAddMoreManagedProfiles(UserHandle.USER_SYSTEM, in testCanAddMoreManagedProfiles_removeProfile()
217 while (mUserManagerService.canAddMoreManagedProfiles(UserHandle.USER_SYSTEM, in testCanAddMoreManagedProfiles_removeProfile()
[all …]
DInstallerTest.java137 final int[] appIds = getAppIds(UserHandle.USER_SYSTEM); in testGetUserSize()
143 mInstaller.getUserSize(null, UserHandle.USER_SYSTEM, 0, in testGetUserSize()
148 mInstaller.getUserSize(null, UserHandle.USER_SYSTEM, Installer.FLAG_USE_QUOTA, in testGetUserSize()
158 final int[] appIds = getAppIds(UserHandle.USER_SYSTEM); in testGetExternalSize()
161 final long[] stats = mInstaller.getExternalSize(null, UserHandle.USER_SYSTEM, 0, appIds); in testGetExternalSize()
165 final long[] quotaStats = mInstaller.getExternalSize(null, UserHandle.USER_SYSTEM, in testGetExternalSize()
DUserManagerServiceUserInfoTest.java92 UserHandle.USER_SYSTEM, users.get(0).id); in setup()
132 mUserManagerService.isUserNameSet(UserHandle.USER_SYSTEM)); in testGetUserName()
133 UserInfo userInfo = mUserManagerService.getUserInfo(UserHandle.USER_SYSTEM); in testGetUserName()
150 mUserManagerService.isUserOfType(UserHandle.USER_SYSTEM, USER_TYPE_SYSTEM_HEADLESS) in testIsUserOfType()
151 || mUserManagerService.isUserOfType(UserHandle.USER_SYSTEM, USER_TYPE_FULL_SYSTEM)); in testIsUserOfType()
/frameworks/base/core/java/com/android/server/backup/
DPreferredActivityBackupHelper.java58 return pm.getPreferredActivityBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
60 return pm.getDefaultAppsBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
62 return pm.getIntentFilterVerificationBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
82 pm.restorePreferredActivities(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
85 pm.restoreDefaultApps(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
88 pm.restoreIntentFilterVerification(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
DShortcutBackupHelper.java45 return getShortcutService().getBackupPayload(UserHandle.USER_SYSTEM); in getBackupPayload()
61 getShortcutService().applyRestore(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
DAccountManagerBackupHelper.java51 return am.backupAccountAccessPermissions(UserHandle.USER_SYSTEM); in getBackupPayload()
74 am.restoreAccountAccessPermissions(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
DSliceBackupHelper.java48 newPayload = sm.getBackupPayload(UserHandle.USER_SYSTEM); in getBackupPayload()
67 sm.applyRestore(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsProviderPerformanceTest.java55 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaFrontEndApi()
64 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaFrontEndApi()
95 FAKE_SETTING_VALUE, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
99 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
104 FAKE_SETTING_VALUE_1, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
108 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DAccessibilitySecurityPolicyTest.java152 UserHandle.USER_SYSTEM, in canDispatchAccessibilityEvent_alwaysDispatchEvents_returnTrue()
165 UserHandle.USER_SYSTEM, in canDispatchAccessibilityEvent_otherEvents_invalidWindowId_returnFalse()
172 when(mMockA11yWindowManager.getActiveWindowId(UserHandle.USER_SYSTEM)) in canDispatchAccessibilityEvent_otherEvents_windowIdIsActive_returnTrue()
179 UserHandle.USER_SYSTEM, in canDispatchAccessibilityEvent_otherEvents_windowIdIsActive_returnTrue()
186 when(mMockA11yWindowManager.getActiveWindowId(UserHandle.USER_SYSTEM)) in canDispatchAccessibilityEvent_otherEvents_windowIdExist_returnTrue()
195 UserHandle.USER_SYSTEM, in canDispatchAccessibilityEvent_otherEvents_windowIdExist_returnTrue()
203 null, Process.SYSTEM_UID, UserHandle.USER_SYSTEM, SYSTEM_PID)); in resolveValidReportedPackage_nullPkgName_returnNull()
209 PACKAGE_NAME, Process.SYSTEM_UID, UserHandle.USER_SYSTEM, SYSTEM_PID), in resolveValidReportedPackage_uidIsSystem_returnPkgName()
216 when(mMockPackageManager.getPackageUidAsUser(PACKAGE_NAME, UserHandle.USER_SYSTEM)) in resolveValidReportedPackage_uidAndPkgNameMatched_returnPkgName()
220 PACKAGE_NAME, APP_UID, UserHandle.USER_SYSTEM, APP_PID), in resolveValidReportedPackage_uidAndPkgNameMatched_returnPkgName()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerServiceMigrationTest.java18 import static android.os.UserHandle.USER_SYSTEM;
112 eq(USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration()
164 assertFalse(dpms.mOwners.hasProfileOwner(USER_SYSTEM)); in testMigration()
172 USER_SYSTEM)); in testMigration()
182 newBaseRestrictions.get(USER_SYSTEM)); in testMigration()
240 eq(USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration2_profileOwnerOnUser0()
275 assertTrue(dpms.mOwners.hasProfileOwner(USER_SYSTEM)); in testMigration2_profileOwnerOnUser0()
280 USER_SYSTEM)); in testMigration2_profileOwnerOnUser0()
287 newBaseRestrictions.get(USER_SYSTEM)); in testMigration2_profileOwnerOnUser0()
296 dpms.getProfileOwnerAdminLocked(USER_SYSTEM).ensureUserRestrictions()); in testMigration2_profileOwnerOnUser0()
[all …]
/frameworks/base/services/core/java/com/android/server/backup/
DSystemBackupAgent.java69 Environment.getUserSystemDirectory(UserHandle.USER_SYSTEM).getAbsolutePath();
71 new File(Environment.getUserSystemDirectory(UserHandle.USER_SYSTEM),
77 Environment.getUserSystemDirectory(UserHandle.USER_SYSTEM).getAbsolutePath();
79 new File(Environment.getUserSystemDirectory(UserHandle.USER_SYSTEM),
87 private int mUserId = UserHandle.USER_SYSTEM;
129 if (mUserId != UserHandle.USER_SYSTEM && !sEligibleForMultiUser.contains(keyPrefix)) { in addHelper()
/frameworks/base/services/backup/java/com/android/server/backup/
DUserBackupManagerFiles.java35 if (userId != UserHandle.USER_SYSTEM) { in getBaseStateDir()
44 if (userId != UserHandle.USER_SYSTEM) { in getDataDir()
54 return new File(getBaseStateDir(UserHandle.USER_SYSTEM), "" + userId); in getStateDirInSystemDir()
/frameworks/opt/car/services/tests/src/com/android/server/wm/
DCarLaunchParamsModifierTest.java240 assertDisplayIsAllowed(UserHandle.USER_SYSTEM, mDisplay0ForDriver); in testNoPolicySet()
241 assertDisplayIsAllowed(UserHandle.USER_SYSTEM, mDisplay10ForPassenger); in testNoPolicySet()
259 assertAllDisplaysAllowedForUser(UserHandle.USER_SYSTEM); in testAllowAllForDriverDuringBoot()
270 assertAllDisplaysAllowedForUser(UserHandle.USER_SYSTEM); in testAllowAllForDriverAfterUserSwitching()
275 assertAllDisplaysAllowedForUser(UserHandle.USER_SYSTEM); in testAllowAllForDriverAfterUserSwitching()
350 UserHandle.USER_SYSTEM, new int[]{mDisplay11ForPassenger.getDisplayId()}); in testPassengerNotAllowedAfterAssigningCurrentUser()
446 assertNoDisplayIsAssigned(UserHandle.USER_SYSTEM); in testPreferSourceForDriver()
449 assertDisplayIsAssigned(UserHandle.USER_SYSTEM, mDisplayArea0ForDriver); in testPreferSourceForDriver()
473 assertNoDisplayIsAssigned(UserHandle.USER_SYSTEM); in testPreferSourceDoNotOverrideActivityOptions()
483 assertDisplayIsAssigned(UserHandle.USER_SYSTEM, mDisplayArea0ForDriver); in testPreferSourceForSpecifiedActivity()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/stats/pull/
DSettingsStatsUtilTest.java19 import static android.os.UserHandle.USER_SYSTEM;
91 USER_SYSTEM).size()); in logGlobalSettings_noWhitelist_correctSize()
107 USER_SYSTEM).size()); in logGlobalSettings_correctSize()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DFakeSettings.java51 if (Settings.Secure.SECURE_FRP_MODE.equals(keyName) && userId == UserHandle.USER_SYSTEM) { in secureGetInt()
55 && userId == UserHandle.USER_SYSTEM) { in secureGetInt()
DRebootEscrowManagerTests.java22 import static android.os.UserHandle.USER_SYSTEM;
200 mStorage.getString(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, null, USER_SYSTEM)); in armService_Success()
203 mStorage.getString(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, null, USER_SYSTEM)); in armService_Success()
222 mStorage.getString(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, null, USER_SYSTEM)); in armService_HalFailure_NonFatal()
246 mStorage.getString(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, null, USER_SYSTEM)); in armService_MultipleUsers_Success()
249 mStorage.getString(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, null, USER_SYSTEM)); in armService_MultipleUsers_Success()
387 mStorage.removeKey(RebootEscrowManager.REBOOT_ESCROW_ARMED_KEY, USER_SYSTEM); in loadRebootEscrowDataIfAvailable_OTAFromBeforeArmedStatus_SuccessMetrics()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/
DBackupManagerServiceRoboTest.java114 mUserOneId = UserHandle.USER_SYSTEM + 1; in setUp()
984 registerUser(backupManagerService, UserHandle.USER_SYSTEM, mUserOneService); in testBeginFullBackup_onRegisteredUser_callsMethodForUser()
987 backupManagerService.beginFullBackup(UserHandle.USER_SYSTEM, job); in testBeginFullBackup_onRegisteredUser_callsMethodForUser()
998 backupManagerService.beginFullBackup(UserHandle.USER_SYSTEM, job); in testBeginFullBackup_onUnknownUser_doesNotPropagateCall()
1007 registerUser(backupManagerService, UserHandle.USER_SYSTEM, mUserOneService); in testEndFullBackup_onRegisteredUser_callsMethodForUser()
1009 backupManagerService.endFullBackup(UserHandle.USER_SYSTEM); in testEndFullBackup_onRegisteredUser_callsMethodForUser()
1019 backupManagerService.endFullBackup(UserHandle.USER_SYSTEM); in testEndFullBackup_onUnknownUser_doesNotPropagateCall()
1135 registerUser(backupManagerService, UserHandle.USER_SYSTEM, mUserOneService); in testSetBackupPassword_onRegisteredUser_callsMethodForUser()
1136 ShadowBinder.setCallingUserHandle(UserHandle.of(UserHandle.USER_SYSTEM)); in testSetBackupPassword_onRegisteredUser_callsMethodForUser()
1157 registerUser(backupManagerService, UserHandle.USER_SYSTEM, mUserOneService); in testHasBackupPassword_onRegisteredUser_callsMethodForUser()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DUserSwitchingDialog.java98 if (UserManager.isSplitSystemUser() && mNewUser.id == UserHandle.USER_SYSTEM) { in inflateContent()
107 if (mOldUser.id == UserHandle.USER_SYSTEM) { in inflateContent()
109 } else if (mNewUser.id == UserHandle.USER_SYSTEM) { in inflateContent()
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
DAccountManagerServiceTest.java137 final UserInfo ui = new UserInfo(UserHandle.USER_SYSTEM, "user0", 0); in setUp()
176 deleteDatabase(new File(mTestInjector.getCeDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
177 deleteDatabase(new File(mTestInjector.getDeDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
178 deleteDatabase(new File(mTestInjector.getPreNDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
346 Account[] accounts = ams2.getAccounts(UserHandle.USER_SYSTEM, mContext.getOpPackageName()); in testRemovedAccountSync()
351 String ceDatabaseName = mTestInjector.getCeDatabaseName(UserHandle.USER_SYSTEM); in testRemovedAccountSync()
356 ams2.onUserUnlocked(newIntentForUser(UserHandle.USER_SYSTEM)); in testRemovedAccountSync()
357 accounts = ams2.getAccounts(UserHandle.USER_SYSTEM, mContext.getOpPackageName()); in testRemovedAccountSync()
366 String preNDatabaseName = mTestInjector.getPreNDatabaseName(UserHandle.USER_SYSTEM); in testPreNDatabaseMigration()
390 String deDatabaseName = mTestInjector.getDeDatabaseName(UserHandle.USER_SYSTEM); in testPreNDatabaseMigration()
[all …]

123456789