Home
last modified time | relevance | path

Searched refs:packageInfo (Results 1 – 25 of 39) sorted by relevance

12

/cts/tests/tests/content/src/android/content/pm/cts/
DAttributionTest.java53 PackageInfo packageInfo = sContext.getPackageManager().getPackageInfo(PACKAGE_NAME, 0); in dontGetAttributions() local
54 assertNotNull(packageInfo); in dontGetAttributions()
55 assertNull(packageInfo.attributions); in dontGetAttributions()
60 PackageInfo packageInfo = sContext.getPackageManager().getPackageInfo(PACKAGE_NAME, in getAttributionsAndVerify() local
62 assertNotNull(packageInfo); in getAttributionsAndVerify()
63 assertNotNull(packageInfo.attributions); in getAttributionsAndVerify()
64 assertEquals(packageInfo.attributions.length, NUM_ATTRIBUTIONS); in getAttributionsAndVerify()
66 assertEquals(packageInfo.attributions[i].getTag(), TAGS[i]); in getAttributionsAndVerify()
67 assertEquals(sContext.getString(packageInfo.attributions[i].getLabel()), LABELS[i]); in getAttributionsAndVerify()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBaseDefaultPermissionGrantPolicyTest.java234 PackageInfo packageInfo = packageInfos.get(i); in getMsdkTargetingPackagesUsingRuntimePerms() local
235 if (packageInfo.requestedPermissions == null) { in getMsdkTargetingPackagesUsingRuntimePerms()
238 if (packageInfo.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) { in getMsdkTargetingPackagesUsingRuntimePerms()
241 for (String requestedPermission : packageInfo.requestedPermissions) { in getMsdkTargetingPackagesUsingRuntimePerms()
243 packageInfoMap.put(packageInfo.packageName, packageInfo); in getMsdkTargetingPackagesUsingRuntimePerms()
266 public static boolean isPackageOnSystemImage(PackageInfo packageInfo) { in isPackageOnSystemImage() argument
267 return (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; in isPackageOnSystemImage()
326 PackageInfo packageInfo = packageInfos.get(packageName); in addException() local
327 if (packageInfo == null) { in addException()
337 if (!packageInfo.applicationInfo.isSystemApp()) { in addException()
[all …]
/cts/tests/tests/wifi/src/android/net/wifi/cts/
DWifiBuildCompat.java59 for (PackageInfo packageInfo : packageManager in getWifiApexVersionCode()
61 if (packageInfo.packageName.endsWith(WIFI_PACKAGE_NAME_SUFFIX)) { in getWifiApexVersionCode()
62 wifiPackageName = packageInfo.packageName; in getWifiApexVersionCode()
63 wifiStackVersion = packageInfo.getLongVersionCode(); in getWifiApexVersionCode()
/cts/tests/tests/security/src/android/security/cts/
DCVE_2021_0922.java52 PackageInfo packageInfo = mInstrumentation.getContext().getPackageManager() in testPocCVE_2021_0922() local
55 for (int i = 0; i < packageInfo.requestedPermissions.length; ++i) { in testPocCVE_2021_0922()
56 if ((packageInfo.requestedPermissionsFlags[i] in testPocCVE_2021_0922()
58 String permission = packageInfo.requestedPermissions[i]; in testPocCVE_2021_0922()
DPackageSignatureTest.java55 for (PackageInfo packageInfo : allPackageInfos) { in testPackageSignatures()
56 String packageName = packageInfo.packageName; in testPackageSignatures()
59 for (Signature signature : packageInfo.signatures) { in testPackageSignatures()
61 badPackages.add(packageInfo.packageName); in testPackageSignatures()
198 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, in writeSignature() local
201 int numSignatures = packageInfo.signatures.length; in writeSignature()
204 Signature signature = packageInfo.signatures[i]; in writeSignature()
/cts/tests/tests/permission/src/android/permission/cts/
DMainlineNetworkStackPermissionTest.java54 PackageInfo packageInfo = packageManager.getPackageInfo(permissioninfo.packageName, in testPackageWithMainlineNetworkStackPermission() local
57 packageInfo.permissions); in testPackageWithMainlineNetworkStackPermission()
59 for (PermissionInfo permission : packageInfo.permissions) { in testPackageWithMainlineNetworkStackPermission()
DShellPermissionTest.java77 final PackageInfo packageInfo = pm.getPackageInfo(pkg, PackageManager.GET_PERMISSIONS); in testBlacklistedPermissions() local
78 assertNotNull("No permissions found for " + pkg, packageInfo.requestedPermissions); in testBlacklistedPermissions()
80 for (String permission : packageInfo.requestedPermissions) { in testBlacklistedPermissions()
/cts/libs/rollback/src/com/android/cts/rollback/lib/
DRollback.java32 Rollback(PackageRollbackInfo packageInfo) { in Rollback() argument
33 mFrom = packageInfo.getVersionRolledBackFrom(); in Rollback()
34 mTo = packageInfo.getVersionRolledBackTo(); in Rollback()
/cts/hostsidetests/backup/RestoreAnyVersion/src/
DRestoreAnyVersionTest.java71 PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo( in checkAppVersionIsNew() local
73 assertEquals(NEW_VERSION, packageInfo.versionCode); in checkAppVersionIsNew()
90 PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo( in checkAppVersionIsOld() local
92 assertEquals(OLD_VERSION, packageInfo.versionCode); in checkAppVersionIsOld()
/cts/tests/tests/os/src/android/os/cts/
DRequiredComponentsTest.java77 PackageInfo packageInfo = packageManager.getPackageInfo(servicesExtensionPackage, 0); in testExtServicesPresent() local
80 (packageInfo.applicationInfo.flags in testExtServicesPresent()
139 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0); in enforceSharedLibPresentAndProperlyHosted() local
142 + requiredHostAppFlags, (packageInfo.applicationInfo.flags in enforceSharedLibPresentAndProperlyHosted()
146 + requiredHostAppPrivateFlags, (packageInfo.applicationInfo.privateFlags in enforceSharedLibPresentAndProperlyHosted()
/cts/hostsidetests/appsecurity/test-apps/KeyRotationTest/src/android/appsecurity/cts/keyrotationtest/service/
DSignatureQueryService.java198 PackageInfo packageInfo; in verifyGetSignatures() local
200 packageInfo = packageManager.getPackageInfo(packageName, in verifyGetSignatures()
205 Signature[] signatures = packageInfo.signatures; in verifyGetSignatures()
253 PackageInfo packageInfo; in verifyGetSigningCertificates() local
255 packageInfo = in verifyGetSigningCertificates()
261 SigningInfo signingInfo = packageInfo.signingInfo; in verifyGetSigningCertificates()
/cts/tests/tests/permission2/src/android/permission2/cts/
DRestrictedPermissionsTest.java478 final PackageInfo packageInfo = packageManager.getPackageInfo(PKG, in getRequestedPermissionsOfApp() local
480 return packageInfo.requestedPermissions; in getRequestedPermissionsOfApp()
503 final PackageInfo packageInfo = packageManager.getPackageInfo(PKG, in assertRestrictedPermissionWhitelisted() local
552 packageInfo.applicationInfo.uid, PKG)).isIn(possibleModes); in assertRestrictedPermissionWhitelisted()
559 final PackageInfo packageInfo = packageManager.getPackageInfo( in assertAllRestrictedPermissionGranted() local
561 if (packageInfo.requestedPermissions != null) { in assertAllRestrictedPermissionGranted()
562 final int permissionCount = packageInfo.requestedPermissions.length; in assertAllRestrictedPermissionGranted()
564 final String permission = packageInfo.requestedPermissions[i]; in assertAllRestrictedPermissionGranted()
568 assertThat((packageInfo.requestedPermissionsFlags[i] in assertAllRestrictedPermissionGranted()
582 final PackageInfo packageInfo = packageManager.getPackageInfo( in assertRestrictedPermissionGranted() local
[all …]
DIntelligenceRolesPolicyTest.java94 PackageInfo packageInfo = context.getPackageManager() in getRequestedPermissions() local
97 return Arrays.asList(packageInfo.requestedPermissions); in getRequestedPermissions()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DAdbPackage.java64 PackageInfo packageInfo = mPackageManager.getPackageInfo( in AdbPackage() local
66 if (packageInfo.requestedPermissions != null) { in AdbPackage()
67 mRequestedPermissions.addAll(Arrays.asList(packageInfo.requestedPermissions)); in AdbPackage()
DPackage.java516 PackageInfo packageInfo = packageInfoFromAnyUser(GET_PERMISSIONS); in requestedPermissions() local
518 if (packageInfo == null) { in requestedPermissions()
527 if (packageInfo.requestedPermissions == null) { in requestedPermissions()
531 return new HashSet<>(Arrays.asList(packageInfo.requestedPermissions)); in requestedPermissions()
590 PackageInfo packageInfo = new PackageInfo(); in packageInfoForUserPreS() local
591 packageInfo.packageName = mPackageName; in packageInfoForUserPreS()
592 packageInfo.requestedPermissions = pkg.requestedPermissions().toArray(new String[]{}); in packageInfoForUserPreS()
594 return packageInfo; in packageInfoForUserPreS()
808 PackageInfo packageInfo = packageInfoFromAnyUser(/* flags= */ 0); in sharedUserId() local
810 if (packageInfo == null) { in sharedUserId()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DUserControlDisabledPackagesTest.java84 PackageInfo packageInfo = mContext.getPackageManager() in isPackageStopped() local
87 boolean stopped = (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_STOPPED) in isPackageStopped()
91 + Integer.toHexString(packageInfo.applicationInfo.flags) + ". Stopped: " + stopped); in isPackageStopped()
/cts/tests/tests/appenumeration/app/source/src/android/appenumeration/cts/query/
DTestProvider.java37 getContext().getPackageManager().getInstalledPackages(0 /*flags*/).forEach(packageInfo -> { in query()
38 matrixCursor.addRow(Collections.singletonList(packageInfo.packageName)); in query()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppActivities.java55 PackageInfo packageInfo = p.getPackageInfo( in activities() local
57 for (android.content.pm.ActivityInfo activityInfo : packageInfo.activities) { in activities()
/cts/tests/security/src/android/keystore/cts/
DAttestationApplicationId.java51 PackageInfo packageInfo = pm.getPackageInfo(packageName, 0); in AttestationApplicationId() local
52 packageInfos.add(new AttestationPackageInfo(packageName, packageInfo.versionCode)); in AttestationApplicationId()
59 PackageInfo packageInfo = pm.getPackageInfo(packageNames[0], PackageManager.GET_SIGNATURES); in AttestationApplicationId() local
60 for (Signature signature : packageInfo.signatures) { in AttestationApplicationId()
/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/
DTestAppSystemServiceFactory.java132 PackageInfo packageInfo; in assertHasRequiredReceiver() local
134 packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_RECEIVERS); in assertHasRequiredReceiver()
140 int numberReceivers = (packageInfo.receivers == null ? 0 : packageInfo.receivers.length); in assertHasRequiredReceiver()
142 + ", info=" + packageInfo + ", receivers=" + numberReceivers); in assertHasRequiredReceiver()
144 if (packageInfo.receivers != null) { in assertHasRequiredReceiver()
145 for (ActivityInfo receiver : packageInfo.receivers) { in assertHasRequiredReceiver()
/cts/hostsidetests/packagemanager/codepath/src/com/android/tests/codepath/host/
DCodePathTest.java67 PackageInfo packageInfo = getDevice().getAppPackageInfo(packageName); in getCodePathFromDumpsys() local
68 return packageInfo.getCodePath(); in getCodePathFromDumpsys()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUSBRestrictRecordAActivity.java95 PackageInfo packageInfo = pm.getPackageInfo( in hasRecordPermission() local
98 if (packageInfo.requestedPermissions != null) { in hasRecordPermission()
99 for (String permission : packageInfo.requestedPermissions) { in hasRecordPermission()
/cts/hostsidetests/dexmetadata/app/src/com/android/cts/dexmetadata/
DInstallDexMetadataTest.java139 android.content.pm.PackageInfo packageInfo; in getAppInfo() local
141 packageInfo = pm.getPackageInfo(pkg, 0); in getAppInfo()
142 return packageInfo.applicationInfo; in getAppInfo()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/mainline/
DModuleDetector.java86 PackageInfo packageInfo = pm.getPackageInfo(module.packageName, flag); in getSignatureDigest() local
88 messageDigest.update(packageInfo.signingInfo.getApkContentsSigners()[0].toByteArray()); in getSignatureDigest()
/cts/tests/tests/permission3/PermissionPolicyApp25/src/android/permission3/cts/permissionpolicy/
DTestProtectionFlagsActivity.kt41 val packageInfo = packageManager.getPackageInfo("android", PackageManager.GET_PERMISSIONS) in <lambda>() constant
43 for (declaredPermissionInfo in packageInfo.permissions) { in <lambda>()

12