/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppWithAdminGrantedPermissionsListerTest.java | 68 private final int MAIN_USER_ID = 0; field in AppWithAdminGrantedPermissionsListerTest 72 private final int APP_1_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 1; 73 private final int APP_2_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 2; 74 private final int APP_3_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 3; 75 private final int APP_4_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 4; 76 private final int APP_5_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 5; 105 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in verifyListInstalledApps() 122 MAIN_USER_ID)).thenReturn(Arrays.asList( in verifyListInstalledApps() 160 final UserHandle mainUser = new UserHandle(MAIN_USER_ID); in verifyListInstalledApps() 201 assertThat(InstalledAppListerTest.checkAppFound(mAppList, APP_1, MAIN_USER_ID)).isTrue(); in verifyListInstalledApps() [all …]
|
D | InstalledAppListerTest.java | 70 private final int MAIN_USER_ID = 0; field in InstalledAppListerTest 74 private final int MAIN_USER_APP_UID = MAIN_USER_ID * PER_USER_UID_RANGE; 101 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in testCountInstalledAppsAcrossAllUsers() 112 MAIN_USER_ID)).thenReturn(Arrays.asList( in testCountInstalledAppsAcrossAllUsers() 123 expectQueryIntentActivities(MAIN_USER_ID, APP_3, true /* launchable */); in testCountInstalledAppsAcrossAllUsers() 124 expectQueryIntentActivities(MAIN_USER_ID, APP_4, false /* launchable */); in testCountInstalledAppsAcrossAllUsers() 127 final UserHandle mainUser = new UserHandle(MAIN_USER_ID); in testCountInstalledAppsAcrossAllUsers() 165 assertThat(checkAppFound(mInstalledAppList, APP_1, MAIN_USER_ID)).isTrue(); in testCountInstalledAppsAcrossAllUsers() 166 assertThat(checkAppFound(mInstalledAppList, APP_2, MAIN_USER_ID)).isFalse(); in testCountInstalledAppsAcrossAllUsers() 167 assertThat(checkAppFound(mInstalledAppList, APP_3, MAIN_USER_ID)).isTrue(); in testCountInstalledAppsAcrossAllUsers() [all …]
|
D | InstalledAppCounterTest.java | 78 private final int MAIN_USER_ID = 0; field in InstalledAppCounterTest 82 private final int MAIN_USER_APP_UID = MAIN_USER_ID * PER_USER_UID_RANGE; 142 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in testCountInstalledAppsAcrossAllUsers() 155 eq(MAIN_USER_ID)); in testCountInstalledAppsAcrossAllUsers() 214 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN))); in testCountInstalledApps_archivingDisabled() 224 eq(MAIN_USER_ID))).thenReturn(Arrays.asList(mApp2)); in testCountInstalledApps_archivingDisabled() 236 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN))); in testCountInstalledApps_archivingEnabled() 247 eq(MAIN_USER_ID))).thenReturn(Arrays.asList(mApp2, mApp7)); in testCountInstalledApps_archivingEnabled() 285 eq(MAIN_USER_ID)) in configurePackageManager() 289 expectQueryIntentActivities(MAIN_USER_ID, APP_3, true /* launchable */); in configurePackageManager() [all …]
|
D | ApplicationFeatureProviderImplTest.java | 86 private final int MAIN_USER_ID = 0; field in ApplicationFeatureProviderImplTest 90 private final int APP_1_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 1; 141 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfPolicyInstalledApps() 158 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListPolicyInstalledApps() 196 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 235 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListAppsWithAdminGrantedPermissions() 255 final UserInfo mainUser = new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN); in testFindPersistentPreferredActivities() 259 when(mUserManager.getUserProfiles()).thenReturn(Arrays.asList(new UserHandle(MAIN_USER_ID), in testFindPersistentPreferredActivities() 261 when(mUserManager.getUserInfo(MAIN_USER_ID)).thenReturn(mainUser); in testFindPersistentPreferredActivities() 270 when(mPackageManagerService.findPersistentPreferredActivity(viewIntent, MAIN_USER_ID)) in testFindPersistentPreferredActivities() [all …]
|
D | AppWithAdminGrantedPermissionsCounterTest.java | 69 private final int MAIN_USER_ID = 0; field in AppWithAdminGrantedPermissionsCounterTest 73 private final int APP_1_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 1; 74 private final int APP_2_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 2; 75 private final int APP_3_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 3; 76 private final int APP_4_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 4; 77 private final int APP_5_UID = MAIN_USER_ID * PER_USER_UID_RANGE + 5; 134 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in verifyCountInstalledApps() 226 MAIN_USER_ID)).thenReturn(Arrays.asList(mApp1, mApp2, mApp3, mApp4, mApp5)); in configurePackageManager() 234 final UserHandle mainUser = new UserHandle(MAIN_USER_ID); in configurePackageManager() 254 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in configureUserManager()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | ApplicationListPreferenceControllerTest.java | 63 private static final int MAIN_USER_ID = 0; field in ApplicationListPreferenceControllerTest 67 private static final int MAIN_USER_APP_UID = MAIN_USER_ID * PER_USER_UID_RANGE; 130 final UserInfo user = new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN); in buildApplicationList()
|