Home
last modified time | relevance | path

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

1234567

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DRoleObserverTest.java198 when(mPm.getPackageUid("dialer", MATCH_ALL, 0)).thenReturn(30); in testInit_forNonBlockableDefaultApps()
202 when(mPm.getPackageUid("emergency", MATCH_ALL, 0)).thenReturn(40); in testInit_forNonBlockableDefaultApps()
238 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testInit_forTrampolines()
270 when(mPm.getPackageUid("phone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_forNonBlockableDefaultApps()
286 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_forTrampolines()
287 when(mPm.getPackageUid("com.browser2", MATCH_ALL, 0)).thenReturn(31); in testSwapDefault_forTrampolines()
338 when(mPm.getPackageUid("emerPhone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_multipleOverlappingApps_forNonBlockableDefaultApps()
372 when(mPm.getPackageUid("phone", MATCH_ALL, 10)).thenReturn(30); in testSwapDefault_newUser_forNonBlockableDefaultApps()
390 when(mPm.getPackageUid("com.browser", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_newUser_forTrampolines()
391 when(mPm.getPackageUid("com.browser2", MATCH_ALL, 10)).thenReturn(1031); in testSwapDefault_newUser_forTrampolines()
DZenModeEventLoggerFake.java110 public int getPackageUid(int i) throws IllegalArgumentException { in getPackageUid() method in ZenModeEventLoggerFake
112 return mChanges.get(i).getPackageUid(); in getPackageUid()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/
DControlsRequestReceiverTest.kt87 `when`(packageManager.getPackageUid(anyString(), anyInt())) in testPackageVerification_nonExistentPackage()
95 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_uidNotInForeground()
104 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_OK()
114 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_nameNotFound()
124 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_notForeground()
136 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_OK()
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/
DUriGrantsMockContext.java116 when(mPmInternal.getPackageUid(eq(PKG_SOCIAL), anyLong(), eq(userId))) in UriGrantsMockContext()
118 when(mPmInternal.getPackageUid(eq(PKG_CAMERA), anyLong(), eq(userId))) in UriGrantsMockContext()
120 when(mPmInternal.getPackageUid(eq(PKG_PRIVATE), anyLong(), eq(userId))) in UriGrantsMockContext()
122 when(mPmInternal.getPackageUid(eq(PKG_PUBLIC), anyLong(), eq(userId))) in UriGrantsMockContext()
124 when(mPmInternal.getPackageUid(eq(PKG_FORCE), anyLong(), eq(userId))) in UriGrantsMockContext()
126 when(mPmInternal.getPackageUid(eq(PKG_COMPLEX), anyLong(), 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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierPrivilegesTrackerTest.java787 when(mPackageManager.getPackageUid(eq(PACKAGE_1), anyInt())).thenReturn(UID_1); in testPackageDisabledAndThenEnabled()
788 when(mPackageManager.getPackageUid(eq(PACKAGE_2), anyInt())).thenReturn(UID_2); in testPackageDisabledAndThenEnabled()
939 when(mPackageManager.getPackageUid(eq(PACKAGE_1), anyInt())).thenReturn(UID_1); in testGetCarrierService_haveCarrierServiceWithSimCarrierPrivileges()
940 when(mPackageManager.getPackageUid(eq(PACKAGE_2), anyInt())).thenReturn(UID_2); in testGetCarrierService_haveCarrierServiceWithSimCarrierPrivileges()
941 when(mPackageManager.getPackageUid(eq(PACKAGE_3), anyInt())).thenReturn(UID_1); in testGetCarrierService_haveCarrierServiceWithSimCarrierPrivileges()
984 when(mPackageManager.getPackageUid(eq(PACKAGE_1), anyInt())).thenReturn(UID_1); in testGetCarrierService_haveCarrierServiceWithoutSimCarrierPrivileges()
985 when(mPackageManager.getPackageUid(eq(PACKAGE_2), anyInt())).thenReturn(UID_2); in testGetCarrierService_haveCarrierServiceWithoutSimCarrierPrivileges()
986 when(mPackageManager.getPackageUid(eq(PACKAGE_3), anyInt())).thenReturn(UID_1); in testGetCarrierService_haveCarrierServiceWithoutSimCarrierPrivileges()
1013 when(mPackageManager.getPackageUid(eq(PACKAGE_1), anyInt())).thenReturn(UID_1); in testGetCarrierService_haveNoCarrierService()
1014 when(mPackageManager.getPackageUid(eq(PACKAGE_2), anyInt())).thenReturn(UID_2); in testGetCarrierService_haveNoCarrierService()
[all …]
/frameworks/native/services/inputflinger/dispatcher/trace/
DInputTracingPerfettoBackend.cpp64 gui::Uid getPackageUid(const sp<content::pm::IPackageManagerNative>& pm, in getPackageUid() function
67 if (auto status = pm->getPackageUid(package, /*flags=*/0, AID_SYSTEM, &outUid); in getPackageUid()
116 mUidMap->emplace(package, getPackageUid(packageManager, package)); in initializeUidMap()
119 mUidMap->emplace(package, getPackageUid(packageManager, package)); in initializeUidMap()
/frameworks/base/core/java/android/os/
DIPermissionController.aidl26 int getPackageUid(String packageName, int flags); in getPackageUid() method
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DActivityManagerTest.java163 uid = pm.getPackageUid(TEST_APP1, 0); in runOnce()
270 int uid = pm.getPackageUid(TEST_APP1, 0); in testFgsProcStatsTracker()
361 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testAppFreezerWithAllowOomAdj()
362 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testAppFreezerWithAllowOomAdj()
515 final int uid = pm.getPackageUid(TEST_APP1, 0); in testKillAppIfBgRestrictedCachedIdle()
716 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testKillPids()
717 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testKillPids()
718 final int uid3 = pm.getPackageUid(TEST_APP3, 0); in testKillPids()
789 final int uid1 = pm.getPackageUid(TEST_APP1, 0); in testGetIsolatedProcesses()
790 final int uid2 = pm.getPackageUid(TEST_APP2, 0); in testGetIsolatedProcesses()
[all …]
/frameworks/native/libs/binder/include/binder/
DPermissionController.h51 LIBBINDER_EXPORTED int getPackageUid(const String16& package, int flags);
DIPermissionController.h41 virtual int getPackageUid(const String16& package, int flags) = 0;
/frameworks/base/apct-tests/perftests/core/src/android/permission/
DAppOpsPerfTest.kt46 opPackageUid = context.getPackageManager().getPackageUid(opPackageName, 0) in setUp()
/frameworks/base/apct-tests/perftests/permission/src/android/perftests/permission/
DAppOpsPerfTest.kt41 opPackageUid = context.getPackageManager().getPackageUid(opPackageName, 0) in setUp()
/frameworks/native/libs/binder/aidl/android/content/pm/
DIPackageManagerNative.aidl55 int getPackageUid(in @utf8InCpp String packageName, in long flags, in int userId); in getPackageUid() method
/frameworks/base/services/core/java/com/android/server/pm/
DPackageManagerNative.java72 public int getPackageUid(String packageName, long flags, int userId) throws RemoteException { in getPackageUid() method in PackageManagerNative
73 return mPm.snapshotComputer().getPackageUid(packageName, flags, userId); in getPackageUid()
DDumpHelper.java336 pw.print(snapshot.getPackageUid(requiredVerifierPackage, in doDump()
343 pw.println(snapshot.getPackageUid(requiredVerifierPackage, in doDump()
363 pw.print(snapshot.getPackageUid(verifierPackageName, in doDump()
370 pw.println(snapshot.getPackageUid(verifierPackageName, in doDump()
670 snapshot.getPackageUid( in dumpProto()
686 snapshot.getPackageUid( in dumpProto()
/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/services/credentials/java/com/android/server/credentials/
DMetricUtilities.java73 protected static int getPackageUid(Context context, ComponentName componentName, in getPackageUid() method in MetricUtilities
78 return getPackageUid(context, componentName.getPackageName(), userId); in getPackageUid()
82 public static int getPackageUid(Context context, String packageName, in getPackageUid() method in MetricUtilities
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
DPowerAllowlistBackend.java205 uid = mAppContext.getSystemService(PackageManager.class).getPackageUid(pkg, 0); in addApp()
247 uid = mAppContext.getSystemService(PackageManager.class).getPackageUid(pkg, 0); in removeApp()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DOwners.java183 final int profileOwnerUid = mPackageManagerInternal.getPackageUid( in pushToActivityManagerLocked()
197 return mPackageManagerInternal.getPackageUid(mData.mDeviceOwner.packageName, in getDeviceOwnerUidLocked()
211 uids.add(mPackageManagerInternal.getPackageUid(info.packageName, in getProfileOwnerUidsLocked()
688 final int uid = mPackageManagerInternal.getPackageUid( in pushToAppOpsLocked()
/frameworks/base/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/tv/
DTvPipTestBase.kt65 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/companion/java/com/android/server/companion/association/
DAssociationRequestsProcessor.java162 final int packageUid = mPackageManagerInternal.getPackageUid(packageName, 0, userId); in processNewAssociationRequest()
229 final int packageUid = mPackageManagerInternal.getPackageUid(packageName, 0, userId); in buildAssociationCancellationIntent()
246 final int packageUid = mPackageManagerInternal.getPackageUid(packageName, 0, userId); in processAssociationRequestApproval()

1234567