Home
last modified time | relevance | path

Searched refs:getPackageInfo (Results 1 – 25 of 155) sorted by relevance

1234567

/frameworks/base/services/tests/servicestests/src/com/android/server/rollback/
DWatchdogRollbackLoggerTest.java78 when(mMockPm.getPackageInfo(anyString(), anyInt())).thenReturn(mPackageInfo); in testLogPackageHasNoMetadata()
82 verify(mMockPm, times(1)).getPackageInfo( in testLogPackageHasNoMetadata()
92 when(mMockPm.getPackageInfo(anyString(), anyInt())).thenReturn(mPackageInfo); in testLogPackageParentKeyIsNull()
100 verify(mMockPm, times(1)).getPackageInfo( in testLogPackageParentKeyIsNull()
114 when(mMockPm.getPackageInfo(anyString(), anyInt())).thenReturn(mPackageInfo); in testLogPackageHasParentKey()
119 verify(mMockPm, times(1)).getPackageInfo( in testLogPackageHasParentKey()
133 when(mMockPm.getPackageInfo(anyString(), anyInt())).thenReturn(mPackageInfo); in testLogPackageNameNotFound()
134 when(mMockPm.getPackageInfo(same(LOGGING_PARENT_VALUE), anyInt())).thenThrow( in testLogPackageNameNotFound()
139 verify(mMockPm, times(1)).getPackageInfo( in testLogPackageNameNotFound()
156 when(mMockPm.getPackageInfo(same(failingPackage), anyInt())).thenReturn(packageInfo); in testApexdLoggingCallsWithParents()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DUserBackupManagerServiceTest.java93 getPackageInfo(TEST_PACKAGE)); in getRequestBackupParams_appIsEligibleForFullBackup()
109 getPackageInfo(TEST_PACKAGE)); in getRequestBackupParams_appIsEligibleForKeyValueBackup()
125 getPackageInfo(TEST_PACKAGE)); in getRequestBackupParams_appIsNotEligibleForBackup()
165 private static PackageInfo getPackageInfo(String packageName) { in getPackageInfo() method in UserBackupManagerServiceTest
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageTrackerHelperImpl.java79 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in getInstalledPackageVersion()
86 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in isPrivilegedApp()
95 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in usesPermission()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DApexManagerTest.java93 final PackageInfo activePkgPi = mApexManager.getPackageInfo(TEST_APEX_PKG, in testGetPackageInfo_setFlagsMatchActivePackage()
99 final PackageInfo factoryPkgPi = mApexManager.getPackageInfo(TEST_APEX_PKG, in testGetPackageInfo_setFlagsMatchActivePackage()
110 PackageInfo factoryPkgPi = mApexManager.getPackageInfo(TEST_APEX_PKG, in testGetPackageInfo_setFlagsMatchFactoryPackage()
116 final PackageInfo activePkgPi = mApexManager.getPackageInfo(TEST_APEX_PKG, in testGetPackageInfo_setFlagsMatchFactoryPackage()
128 assertThat(mApexManager.getPackageInfo(TEST_APEX_PKG, 0)).isNull(); in testGetPackageInfo_setFlagsNone()
369 PackageInfo newInfo = mApexManager.getPackageInfo("test.apex.rebootless", in testInstallPackage_activeOnSystem()
377 PackageInfo factoryInfo = mApexManager.getPackageInfo("test.apex.rebootless", in testInstallPackage_activeOnSystem()
407 PackageInfo newInfo = mApexManager.getPackageInfo("test.apex.rebootless", in testInstallPackage_activeOnData()
415 PackageInfo factoryInfo = mApexManager.getPackageInfo("test.apex.rebootless", in testInstallPackage_activeOnData()
DShortcutManagerTest5.java75 PackageInfo pi = mShortcutService.getPackageInfo( in testGetPackageInfo()
81 pi = mShortcutService.getPackageInfo( in testGetPackageInfo()
87 pi = mShortcutService.getPackageInfo( in testGetPackageInfo()
/frameworks/base/services/core/java/com/android/server/pm/
DShortcutLauncher.java220 getPackageInfo().updateFromPackageInfo(pi); in ensurePackageInfo()
229 if (forBackup && !getPackageInfo().isBackupAllowed()) { in saveToXml()
241 getPackageInfo().saveToXml(mShortcutUser.mService, out, forBackup); in saveToXml()
338 ret.getPackageInfo().loadFromXml(parser, fromBackup); in loadFromXml()
382 getPackageInfo().dump(pw, prefix + " "); in dump()
DShortcutPackage.java795 if (getPackageInfo().isShadow()) { in findAll()
830 if (getPackageInfo().isShadow()) { in findAllByIds()
855 if (getPackageInfo().isShadow()) { in findAllPinned()
1077 pi = mShortcutUser.mService.getPackageInfo( in rescanPackageIfNeeded()
1094 if ((getPackageInfo().getVersionCode() == pi.getLongVersionCode()) in rescanPackageIfNeeded()
1095 && (getPackageInfo().getLastUpdateTime() == pi.lastUpdateTime) in rescanPackageIfNeeded()
1129 getPackageInfo().getVersionCode(), pi.getLongVersionCode())); in rescanPackageIfNeeded()
1131 getPackageInfo().updateFromPackageInfo(pi); in rescanPackageIfNeeded()
1147 final long newVersionCode = getPackageInfo().getVersionCode(); in rescanPackage()
1157 if (getPackageInfo().getBackupSourceVersionCode() > newVersionCode) { in rescanPackage()
[all …]
/frameworks/base/tests/TelephonyCommonTests/src/com/android/internal/telephony/tests/
DSmsApplicationTest.java203 when(mPackageManager.getPackageInfo(eq(SmsApplication.PHONE_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
210 when(mPackageManager.getPackageInfo(eq(SmsApplication.MMS_SERVICE_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
217 when(mPackageManager.getPackageInfo(eq(SmsApplication.BLUETOOTH_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
224 when(mPackageManager.getPackageInfo( in setupPackageInfosForCoreApps()
/frameworks/base/tests/StagedInstallTest/app/src/com/android/tests/stagedinstallinternal/
DStagedInstallInternalTest.java340 PackageInfo apex = pm.getPackageInfo("test.apex.rebootless", PackageManager.MATCH_APEX); in testRebootlessUpdates()
354 PackageInfo apex = pm.getPackageInfo("test.apex.rebootless", PackageManager.MATCH_APEX); in testRebootlessUpdates()
362 PackageInfo apex = pm.getPackageInfo("test.apex.rebootless", in testRebootlessUpdates()
376 PackageInfo apex = pm.getPackageInfo("test.apex.rebootless", PackageManager.MATCH_APEX); in testRebootlessUpdates()
384 PackageInfo apex = pm.getPackageInfo("test.apex.rebootless", in testRebootlessUpdates()
/frameworks/libs/net/common/device/com/android/net/module/util/
DDeviceConfigUtils.java53 final long version = context.getPackageManager().getPackageInfo( in getPackageVersion()
237 final long version = packageManager.getPackageInfo(modulePackageName, in getModuleVersion()
/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DDeviceConfigUtilsTest.java91 doReturn(pi).when(mPm).getPackageInfo(anyString(), anyInt()); in setUp()
221 doThrow(NameNotFoundException.class).when(mPm).getPackageInfo(anyString(), anyInt()); in testFeatureIsEnabledWithException()
265 verify(mPm, times(1)).getPackageInfo(anyString(), anyInt()); in testFeatureIsEnabledCaching()
/frameworks/base/tests/SharedLibrary/lib/src/com/google/android/test/shared_library/
DSharedLibraryMain.java45 pi = context.getPackageManager().getPackageInfo(LIBRARY_PACKAGE, 0); in getVersion()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/
DPartialConversationInfoTest.java129 when(mMockPackageManager.getPackageInfo(eq(TEST_PACKAGE_NAME), anyInt())) in setUp()
137 when(mMockPackageManager.getPackageInfo(eq(TEST_SYSTEM_PACKAGE_NAME), anyInt())) in setUp()
139 when(mMockPackageManager.getPackageInfo(eq("android"), anyInt())) in setUp()
/frameworks/base/services/core/java/com/android/server/tracing/
DTracingServiceProxy.java83 PackageInfo info = mPackageManager.getPackageInfo(TRACING_APP_PACKAGE_NAME, in notifyTraceur()
/frameworks/base/services/core/java/com/android/server/rollback/
DWatchdogRollbackLogger.java67 ApplicationInfo ai = packageManager.getPackageInfo(packageName, flags).applicationInfo; in getLoggingParentName()
96 .getPackageInfo(logPackageName, 0 /* flags */).getLongVersionCode()); in getLogPackage()
DRollbackManagerServiceImpl.java865 pkgInfo = getPackageInfo(packageName);
883 apkPkgInfo = getPackageInfo(apkInApex);
1077 pkgInfo = getPackageInfo(packageName);
1091 private PackageInfo getPackageInfo(String packageName)
1099 return pm.getPackageInfo(packageName, PackageManager.MATCH_ANY_USER);
1101 return pm.getPackageInfo(packageName, PackageManager.MATCH_APEX);
/frameworks/base/services/core/java/com/android/server/webkit/
DSystemImpl.java149 return pm.getPackageInfo(packageName, PackageManager.MATCH_FACTORY_ONLY) in getFactoryPackageVersion()
229 return pm.getPackageInfo(configInfo.packageName, PACKAGE_FLAGS); in getPackageInfoForProvider()
/frameworks/base/core/java/android/webkit/
DUserPackage.java95 public PackageInfo getPackageInfo() { in getPackageInfo() method in UserPackage
/frameworks/base/core/java/android/content/pm/
DLauncherActivityInfo.java157 return mPm.getPackageInfo(getActivityInfo().packageName, in getFirstInstallTime()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/
DUserBackupManagerServiceTest.java554 PackageInfo packageInfo = getPackageInfo(transportPackage); in setUpForUpdateTransportAttributes()
1196 List<PackageInfo> packages = Arrays.asList(getPackageInfo(USER_FACING_PACKAGE), in testFilterUserFacingPackages_shouldSkipUserFacing_filtersUserFacing()
1197 getPackageInfo(PACKAGE_1)); in testFilterUserFacingPackages_shouldSkipUserFacing_filtersUserFacing()
1212 List<PackageInfo> packages = Arrays.asList(getPackageInfo(USER_FACING_PACKAGE), in testFilterUserFacingPackages_shouldNotSkipUserFacing_doesNotFilterUserFacing()
1213 getPackageInfo(PACKAGE_1)); in testFilterUserFacingPackages_shouldNotSkipUserFacing_doesNotFilterUserFacing()
1247 private PackageInfo getPackageInfo(String packageName) { in getPackageInfo() method in UserBackupManagerServiceTest
1257 PackageInfo packageInfo = getPackageInfo(packageName); in registerPackages()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDpmTestBase.java144 mRealTestContext.getPackageManager().getPackageInfo( in markPackageAsInstalled()
152 doReturn(pi).when(mServices.ipackageManager).getPackageInfo(packageName, 0, userId); in markPackageAsInstalled()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/
DDynamicCodeLoggerTests.java126 .getPackageInfo(OWNING_PACKAGE_NAME, /*flags*/ 0, OWNER_USER_ID); in setup()
263 verify(mPM, atMost(1)).getPackageInfo(OWNING_PACKAGE_NAME, /*flags*/ 0, OWNER_USER_ID); in testMultipleLoadersAndFiles()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DPackageBasedTokenUtil.java76 signatures = packageManager.getPackageInfo( in generatePackageBasedToken()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/
DAppIntegrityManagerServiceImplTest.java527 mRealContext.getPackageManager().getPackageInfo(TEST_FRAMEWORK_PACKAGE, 0); in makeUsSystemApp()
535 .getPackageInfo(eq(TEST_FRAMEWORK_PACKAGE), anyInt()); in makeUsSystemApp()
543 .getPackageInfo( in makeVerificationIntent()
545 doReturn(packageInfo).when(mSpyPackageManager).getPackageInfo(eq(INSTALLER), anyInt()); in makeVerificationIntent()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DDefaultPermissionGrantPolicy.java290 public @Nullable PackageInfo getPackageInfo(@NonNull String pkg) {
296 return mContext.getPackageManager().getPackageInfo(pkg,
485 grantPermissionsToPackage(pm, pm.getPackageInfo(packageName), in grantPermissionsToPackage()
1123 final int flags = pm.getPermissionFlags(permission, pm.getPackageInfo(packageName), in revokeRuntimePermissions()
1188 String[] requestedByNonSystemPackage = pm.getPackageInfo(pkg.packageName) in grantRuntimePermissions()
1568 abstract @Nullable PackageInfo getPackageInfo(@NonNull String pkg); in getPackageInfo() method in DefaultPermissionGrantPolicy.PackageManagerWrapper
1571 PackageInfo pi = getPackageInfo(pkg); in getSystemPackageInfo()
1614 return isSystemPackage(getPackageInfo(packageName)); in isSystemPackage()
1788 public @Nullable PackageInfo getPackageInfo(@NonNull String pkg) { in getPackageInfo() method in DefaultPermissionGrantPolicy.DelayingPackageManagerCache
1794 PackageInfo pi = NO_PM_CACHE.getPackageInfo(pkg); in getPackageInfo()

1234567