Home
last modified time | relevance | path

Searched refs:getPackageUid (Results 1 – 25 of 105) sorted by relevance

12345

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/
DControlsRequestReceiverTest.kt84 `when`(packageManager.getPackageUid(anyString(), anyInt())) in testPackageVerification_nonExistentPackage()
92 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_uidNotInForeground()
101 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_OK()
111 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_nameNotFound()
121 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_notForeground()
133 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_OK()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/
DUiModeManagerServiceTest.java478 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)) in requestProjection_failsForBogusPackageName()
488 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)) in requestProjection_failsIfNameNotFound()
498 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection_failsIfNoProjectionTypes()
510 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection_failsIfMultipleProjectionTypes()
525 doThrow(new SecurityException()).when(mPackageManager).getPackageUid(PACKAGE_NAME, 0); in requestProjection_enforcesToggleAutomotiveProjectionPermission()
534 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection_automotive_failsIfAlreadySetByOtherPackage()
539 when(mPackageManager.getPackageUid(otherPackage, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection_automotive_failsIfAlreadySetByOtherPackage()
547 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection_failsIfCannotLinkToDeath()
556 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in requestProjection()
571 when(mPackageManager.getPackageUid(PACKAGE_NAME, 0)).thenReturn(TestInjector.CALLING_UID); in releaseProjection_failsForBogusPackageName()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/visibilitystore/
DVisibilityStoreImplTest.java97 mUid = mContext.getPackageManager().getPackageUid(mContext.getPackageName(), /*flags=*/ 0); in setUp()
286 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
300 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
314 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
327 when(mockPackageManager.getPackageUid(eq(packageNameBar), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
350 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
363 when(mockPackageManager.getPackageUid(eq(packageNameBar), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
387 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testIsSchemaSearchableByCaller_packageAccessibilityHandlesNameNotFoundException()
445 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testEmptyPrefix()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DRoleObserverTest.java189 when(mPm.getPackageUid("dialer", MATCH_ALL, 0)).thenReturn(30); in testInit_forNonBlockableDefaultApps()
193 when(mPm.getPackageUid("emergency", MATCH_ALL, 0)).thenReturn(40); in testInit_forNonBlockableDefaultApps()
229 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testInit_forTrampolines()
261 when(mPm.getPackageUid("phone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_forNonBlockableDefaultApps()
277 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_forTrampolines()
278 when(mPm.getPackageUid("com.browser2", MATCH_ALL, 0)).thenReturn(31); in testSwapDefault_forTrampolines()
329 when(mPm.getPackageUid("emerPhone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_multipleOverlappingApps_forNonBlockableDefaultApps()
363 when(mPm.getPackageUid("phone", MATCH_ALL, 10)).thenReturn(30); in testSwapDefault_newUser_forNonBlockableDefaultApps()
381 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_newUser_forTrampolines()
382 when(mPm.getPackageUid("com.browser2", MATCH_ALL, 10)).thenReturn(1031); in testSwapDefault_newUser_forTrampolines()
/frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/util/
DPackageUtil.java37 public static int getPackageUid(@NonNull Context context, @NonNull String packageName) { in getPackageUid() method in PackageUtil
39 return context.getPackageManager().getPackageUid(packageName, /*flags=*/ 0); in getPackageUid()
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/stats/
DPlatformLoggerTest.java153 when(mockPackageManager.getPackageUid(testPackageName, /*flags=*/0)).thenReturn(testUid); in testGetPackageUidAsUser()
159 .getPackageUid(eq(testPackageName), /*flags=*/ anyInt()); in testGetPackageUidAsUser()
168 .getPackageUid(eq(testPackageName), /*flags=*/ anyInt()); in testGetPackageUidAsUser()
178 .getPackageUid(eq(testPackageName), /*flags=*/ anyInt()); in testGetPackageUidAsUser()
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/
DUriGrantsMockContext.java123 when(mPmInternal.getPackageUid(eq(PKG_SOCIAL), anyInt(), eq(userId))) in UriGrantsMockContext()
125 when(mPmInternal.getPackageUid(eq(PKG_CAMERA), anyInt(), eq(userId))) in UriGrantsMockContext()
127 when(mPmInternal.getPackageUid(eq(PKG_PRIVATE), anyInt(), eq(userId))) in UriGrantsMockContext()
129 when(mPmInternal.getPackageUid(eq(PKG_PUBLIC), anyInt(), eq(userId))) in UriGrantsMockContext()
131 when(mPmInternal.getPackageUid(eq(PKG_FORCE), anyInt(), eq(userId))) in UriGrantsMockContext()
133 when(mPmInternal.getPackageUid(eq(PKG_COMPLEX), anyInt(), eq(userId))) in UriGrantsMockContext()
/frameworks/native/libs/binder/
DPermissionController.cpp82 int PermissionController::getPackageUid(const String16& package, int flags) in getPackageUid() function in android::PermissionController
85 return service != nullptr ? service->getPackageUid(package, flags) : -1; in getPackageUid()
DIPermissionController.cpp93 virtual int getPackageUid(const String16& package, int flags) in getPackageUid() function in android::BpPermissionController
164 const int uid = getPackageUid(package, flags); in onTransact()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DActivityManagerTest.java160 uid = pm.getPackageUid(TEST_APP1, 0); in runOnce()
267 int uid = pm.getPackageUid(TEST_APP1, 0); in testFgsProcStatsTracker()
358 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testAppFreezerWithAllowOomAdj()
359 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testAppFreezerWithAllowOomAdj()
511 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testKillPids()
512 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testKillPids()
513 final int uid3 = pm.getPackageUid(TEST_APP3, 0); in testKillPids()
584 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testGetIsolatedProcesses()
585 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testGetIsolatedProcesses()
586 final int uid3 = pm.getPackageUid(TEST_APP3, 0); in testGetIsolatedProcesses()
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/
DAppSearchImplPlatformTest.java101 mContext.getPackageManager().getPackageUid(mContext.getPackageName(), /*flags=*/ 0); in setUp()
113 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetSchema_existingSchemaRetainsVisibilitySetting()
220 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testRemoveSchema_removedFromVisibilityStore()
413 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetSchema_visibleToPackages()
/frameworks/base/core/java/android/os/
DIPermissionController.aidl26 int getPackageUid(String packageName, int flags); in getPackageUid() method
/frameworks/native/libs/binder/include/binder/
DPermissionController.h52 int getPackageUid(const String16& package, int flags);
DIPermissionController.h41 virtual int getPackageUid(const String16& package, int flags) = 0;
/frameworks/base/services/core/java/com/android/server/firewall/
DSenderPackageFilter.java50 packageUid = pm.getPackageUid(mPackageName, PackageManager.MATCH_ANY_USER, in matches()
/frameworks/base/services/incremental/
DIncrementalServiceValidation.cpp60 if (auto packageUid = pc.getPackageUid(packageName, 0); packageUid != uid) { in CheckPermissionForDataDelivery()
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/
DTvPipTestBase.kt64 private val systemUiUid = packageManager.getPackageUid(SYSTEM_UI_PACKAGE_NAME, 0) in fail()
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/management/
DControlsRequestReceiver.kt42 context.packageManager.getPackageUid(packageName, 0) in isPackageInForeground()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DOneTimePermissionUserManager.java121 uid = mContext.getPackageManager().getPackageUid(packageName, 0); in startPackageOneTimeSession()
146 uid = mContext.getPackageManager().getPackageUid(packageName, 0); in stopPackageOneTimeSession()
/frameworks/base/services/core/java/com/android/server/uri/
DUriGrantsManagerService.java269 final int packageUid = pm.getPackageUid(packageName, in getUriPermissions()
347 uid = mPmInternal.getPackageUid(toPackage, 0 /* flags */, userId); in takePersistableUriPermission()
412 uid = mPmInternal.getPackageUid(toPackage, 0 /* flags */ , userId); in releasePersistableUriPermission()
611 targetUid = mPmInternal.getPackageUid(targetPkg, MATCH_DEBUG_TRIAGED_MISSING, in checkGrantUriPermissionFromIntentUnlocked()
700 int targetUid = mPmInternal.getPackageUid( in readGrantedUriPermissionsLocked()
797 int targetUid = mPmInternal.getPackageUid(targetPkg, MATCH_DEBUG_TRIAGED_MISSING, in grantUriPermissionUnlocked()
1124 targetUid = mPmInternal.getPackageUid(targetPkg, MATCH_DEBUG_TRIAGED_MISSING, in checkGrantUriPermissionUnlocked()
1477 dumpUid = mPmInternal.getPackageUid(dumpPackage, in dump()
/frameworks/base/native/android/tests/activitymanager/nativeTests/src/
DActivityManagerNativeTest.cpp76 uid = pc.getPackageUid(android::String16(packageName), 0); in getUidForPackage()
/frameworks/base/tests/ActivityManagerPerfTests/tests/src/com/android/frameworks/perftests/am/util/
DTargetPackageUtils.java113 sTestAppUid = pm.getPackageUid(PACKAGE_NAME, 0); in getTestAppUid()
186 final int uid = pm.getPackageUid(pkgName, 0); in stopStubPackage()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DPendingIntentControllerTest.java83 when(mIPackageManager.getPackageUid(eq(TEST_PACKAGE_NAME), anyInt(), anyInt())).thenReturn( in setUp()
/frameworks/base/services/core/java/com/android/server/security/
DFileIntegrityService.java90 final int packageUid = packageManager.getPackageUid(
/frameworks/base/services/tests/servicestests/src/com/android/server/compat/
DPlatformCompatTest.java74 when(mPackageManager.getPackageUid(eq(PACKAGE_NAME), eq(0))).thenThrow( in setUp()
76 when(mPackageManagerInternal.getPackageUid(eq(PACKAGE_NAME), eq(0), anyInt())) in setUp()

12345