/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/ |
D | UidPackageMapperTest.java | 126 assertThat(mUidMapper.getPackagesForUid(1)) in testInitPullsAllPackages() 128 assertThat(mUidMapper.getPackagesForUid(2)).containsExactly("com.android.c"); in testInitPullsAllPackages() 129 assertThat(mUidMapper.getPackagesForUid(4)).containsExactly("com.andr.apex"); in testInitPullsAllPackages() 130 assertThat(mUidMapper.getPackagesForUid(5)).isEmpty(); in testInitPullsAllPackages() 131 assertThat(mUidMapper.getPackagesForUid(10)).isEmpty(); in testInitPullsAllPackages() 140 assertThat(mUidMapper.getPackagesForUid(5)).containsExactly("com.android.n"); in testOnAppInstalled() 141 assertThat(mUidMapper.getPackagesForUid(1)) // other apps are there too in testOnAppInstalled() 155 assertThat(mUidMapper.getPackagesForUid(1)).containsExactly("com.android.a"); in testOnAppRemoved() 157 assertThat(mUidMapper.getPackagesForUid(2)).containsExactly("com.android.c"); in testOnAppRemoved() 176 assertThat(mUidMapper.getPackagesForUid(1)) in testOnAppRemovedThenInstalled() [all …]
|
/packages/apps/Settings/src/com/android/settings/datausage/lib/ |
D | AppPreferenceRepository.kt | 33 getPackagesForUid(uid).mapNotNull { packageName -> in <lambda>() 38 private fun getPackagesForUid(uid: Int): Array<String> = in <lambda>() method 39 packageManager.getPackagesForUid(uid) ?: emptyArray() in <lambda>()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/devapi/ |
D | AppPackageNameRetrieverTest.java | 57 when(mPackageManager.getPackagesForUid(appUid)).thenReturn(new String[] {appPackage}); in testReturnsThePackageName() 66 when(mPackageManager.getPackagesForUid(appUid)) in testReturnsFirstPackageNameIfMoreThanOneAvailable() 76 when(mPackageManager.getPackagesForUid(appUid)).thenReturn(null); in testThrowsExceptionIfNoPackageNameIsAvailable()
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/ |
D | PackageInfoUtils.java | 125 String[] getPackagesForUid(int packageUid, @NonNull UserHandle user, @NonNull Context context) { in getPackagesForUid() method in PackageInfoUtils 126 return getPackageManagerAsUser(user, context).getPackagesForUid(packageUid); in getPackagesForUid() 173 String[] packages = packageManager.getPackagesForUid(uid); in getSharedUserNameFromUid() 204 String[] packages = packageManager.getPackagesForUid(uid); in getPackageNamesForUid()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | PowerUsageFeatureProviderImplTest.java | 63 when(mPackageManager.getPackagesForUid(UID_CALENDAR)).thenReturn(PACKAGES_CALENDAR); in setUp() 64 when(mPackageManager.getPackagesForUid(UID_MEDIA)).thenReturn(PACKAGES_MEDIA); in setUp() 65 when(mPackageManager.getPackagesForUid(UID_SYSTEMUI)).thenReturn(PACKAGES_SYSTEMUI); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/slice/ |
D | WifiSliceTest.java | 120 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{mSIPackageName}); in setUp() 155 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{mSIPackageName}); in getWifiSlice_fromSIPackage_shouldHaveTitleAndToggle() 171 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{"com.test"}); in getWifiSlice_notFromSIPackageAndWithWifiPermission_shouldHaveTitleAndToggle() 186 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{"com.test"}); in getWifiSlice_notFromSIPackageAndWithoutWifiPermission_shouldReturnNoToggle()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | PermissionMonitorTest.java | 302 final String[] oldPackages = mPackageManager.getPackagesForUid(uid); in buildAndMockPackageInfoWithPermissions() 308 doReturn(newPackages).when(mPackageManager).getPackagesForUid(eq(uid)); in buildAndMockPackageInfoWithPermissions() 347 final String[] oldPackages = mPackageManager.getPackagesForUid(uid); in removePackage() 354 doReturn(newPackages).when(mPackageManager).getPackagesForUid(eq(uid)); in removePackage() 761 .getPackagesForUid(intThat(uid -> UserHandle.getAppId(uid) == SYSTEM_APPID1)); in testUserAndPackageAddRemove() 783 .getPackagesForUid(intThat(uid -> UserHandle.getAppId(uid) == MOCK_APPID1)); in testUserAndPackageAddRemove() 788 when(mPackageManager.getPackagesForUid( in testUserAndPackageAddRemove() 802 when(mPackageManager.getPackagesForUid( in testUserAndPackageAddRemove() 1190 when(mPackageManager.getPackagesForUid(MOCK_UID11)).thenReturn(new String[]{}); in testPackageUninstallBasic() 1200 when(mPackageManager.getPackagesForUid(MOCK_UID11)).thenReturn(new String[]{}); in testPackageRemoveThenAdd() [all …]
|
/packages/apps/KeyChain/robotests/src/com/android/keychain/internal/ |
D | GrantsDatabaseTest.java | 137 when(pm.getPackagesForUid(DUMMY_UID)).thenReturn(new String[] {"p"}); 147 when(pm.getPackagesForUid(DUMMY_UID)).thenReturn(null); 148 when(pm.getPackagesForUid(DUMMY_UID2)).thenReturn(null);
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/cluster/renderer/ |
D | InstrumentClusterRenderingServiceTest.java | 170 .when(mService.mSpyPackageManager).getPackagesForUid(userId); in setNavigationContextOwner_launchesNavigationComponent() 211 doReturn(new String[]{}).when(mService.mSpyPackageManager).getPackagesForUid(userId); in setNavigationContextOwner_noPackages_doesNothing() 229 .when(mService.mSpyPackageManager).getPackagesForUid(userId); in setNavigationContextOwner_clusterPermissionMissing_doesNothing() 298 .when(mService.mSpyPackageManager).getPackagesForUid(userId); in mockPackageManagerInteraction()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/devapi/ |
D | AppPackageNameRetriever.java | 61 String[] possibleAppPackages = mPackageManager.getPackagesForUid(appUid); in getAppPackageNameForUid()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | FledgeAuthorizationFilterTest.java | 118 when(mPackageManagerMock.getPackagesForUid(UID)) in testAssertCallingPackageName_isCallingPackageName() 123 verify(mPackageManagerMock).getPackagesForUid(UID); in testAssertCallingPackageName_isCallingPackageName() 139 when(mPackageManagerMock.getPackagesForUid(UID)) in testAssertCallingPackageName_isNotCallingPackageName_throwSecurityException() 152 verify(mPackageManagerMock).getPackagesForUid(UID); in testAssertCallingPackageName_isNotCallingPackageName_throwSecurityException() 164 when(mPackageManagerMock.getPackagesForUid(UID)).thenReturn(new String[] {}); in testAssertCallingPackageName_packageNotExist_throwSecurityException() 176 verify(mPackageManagerMock).getPackagesForUid(UID); in testAssertCallingPackageName_packageNotExist_throwSecurityException()
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/ |
D | FirstGrantTimeUnitTest.java | 196 when(mPackageManager.getPackagesForUid(uid)).thenReturn(packageNames); in testOnPermissionsChangedCalledWhileDeviceIsLocked_getGrantTimeNotNullAfterUnlock() 220 when(mPackageManager.getPackagesForUid(uid)).thenReturn(packageNames); in testOnPermissionsChangedCalled_withHealthPermissionsUid_expectBackgroundTaskAdded() 238 when(mPackageManager.getPackagesForUid(uid)).thenReturn(packageNames); in testOnPermissionsChangedCalled_withNoHealthPermissionsUid_expectNoBackgroundTaskAdded()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | CarBugreportManagerServiceTest.java | 111 when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn( in test_requestBugreport_failsIfNotDesignatedAppOnUserBuild() 275 when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn( in mockDesignatedBugReportApp()
|
/packages/modules/NetworkStack/src/com/android/server/util/ |
D | PermissionUtil.java | 102 final String[] packages = pm.getPackagesForUid(uid); in setTestUid()
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | ShellPermissionTest.java | 70 final String[] pkgs = pm.getPackagesForUid(uid); in testBlacklistedPermissions()
|
/packages/apps/SecureElement/src/com/android/se/internal/ |
D | Util.java | 111 String[] packageName = packageManager.getPackagesForUid(uid); in getPackageNameFromCallingUid()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothPermissionActivityTest.java | 71 when(pm.getPackagesForUid(Process.BLUETOOTH_UID)).thenReturn(new String[] {btPkgName}); in sendBroadcastWithPermission()
|
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/ |
D | AppPreferenceRepositoryTest.kt | 40 on { getPackagesForUid(UID) } doReturn arrayOf(PACKAGE_NAME) in <lambda>()
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | PackageInfoHandler.java | 134 public List<String> getPackagesForUid(int uid, String genericPackageName) { in getPackagesForUid() method in PackageInfoHandler 212 String[] packages = mPackageManager.getPackagesForUid(uid); in populateSharedPackagesLocked()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | LocalCallingIdentity.java | 154 final String[] sharedPackageNames = context.getPackageManager().getPackagesForUid(uid); in fromExternal() 219 final String[] sharedPackageNames = context.getPackageManager().getPackagesForUid(uid); in forTest() 289 final String[] packageNames = context.getPackageManager().getPackagesForUid(uid); in getSharedPackageNamesListInternal()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/ |
D | AppFocusTest.java | 52 String[] myPackages = getContext().getPackageManager().getPackagesForUid(Process.myUid()); in testFocusChange()
|
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/helpers/ |
D | PackageManagerHelper.java | 102 String[] possibleAppPackages = mPackageManager.getPackagesForUid(callingUid); in getPackageNamesForUid()
|
/packages/modules/AdServices/adservices/tests/test-util/java/com/android/adservices/common/ |
D | DevContextUtils.java | 134 String[] possibleAppPackages = context.getPackageManager().getPackagesForUid(appUid); in getAppPackageNameForUid()
|
/packages/apps/Settings/src/com/android/settings/emergency/ |
D | EmergencyActionContentProvider.java | 93 final String callingPackage = context.getPackageManager().getPackagesForUid(callingUid)[0]; in isEmergencyInfo()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | VoicemailPermissions.java | 137 String[] packages = mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid()); in callerHasCarrierPrivileges()
|