Home
last modified time | relevance | path

Searched refs:getPackagesForUid (Results 1 – 25 of 117) sorted by relevance

12345

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/
DUidPackageMapperTest.java126 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/
DAppPreferenceRepository.kt33 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/
DAppPackageNameRetrieverTest.java57 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/
DPackageInfoUtils.java125 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/
DPowerUsageFeatureProviderImplTest.java63 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/
DWifiSliceTest.java120 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/
DPermissionMonitorTest.java302 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/
DGrantsDatabaseTest.java137 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/
DInstrumentClusterRenderingServiceTest.java170 .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/
DAppPackageNameRetriever.java61 String[] possibleAppPackages = mPackageManager.getPackagesForUid(appUid); in getAppPackageNameForUid()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DFledgeAuthorizationFilterTest.java118 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/
DFirstGrantTimeUnitTest.java196 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/
DCarBugreportManagerServiceTest.java111 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/
DPermissionUtil.java102 final String[] packages = pm.getPackagesForUid(uid); in setTestUid()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DShellPermissionTest.java70 final String[] pkgs = pm.getPackagesForUid(uid); in testBlacklistedPermissions()
/packages/apps/SecureElement/src/com/android/se/internal/
DUtil.java111 String[] packageName = packageManager.getPackagesForUid(uid); in getPackageNameFromCallingUid()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothPermissionActivityTest.java71 when(pm.getPackagesForUid(Process.BLUETOOTH_UID)).thenReturn(new String[] {btPkgName}); in sendBroadcastWithPermission()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/
DAppPreferenceRepositoryTest.kt40 on { getPackagesForUid(UID) } doReturn arrayOf(PACKAGE_NAME) in <lambda>()
/packages/services/Car/service/src/com/android/car/watchdog/
DPackageInfoHandler.java134 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/
DLocalCallingIdentity.java154 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/
DAppFocusTest.java52 String[] myPackages = getContext().getPackageManager().getPackagesForUid(Process.myUid()); in testFocusChange()
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/helpers/
DPackageManagerHelper.java102 String[] possibleAppPackages = mPackageManager.getPackagesForUid(callingUid); in getPackageNamesForUid()
/packages/modules/AdServices/adservices/tests/test-util/java/com/android/adservices/common/
DDevContextUtils.java134 String[] possibleAppPackages = context.getPackageManager().getPackagesForUid(appUid); in getAppPackageNameForUid()
/packages/apps/Settings/src/com/android/settings/emergency/
DEmergencyActionContentProvider.java93 final String callingPackage = context.getPackageManager().getPackagesForUid(callingUid)[0]; in isEmergencyInfo()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DVoicemailPermissions.java137 String[] packages = mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid()); in callerHasCarrierPrivileges()

12345