Home
last modified time | relevance | path

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

12

/cts/tests/tests/content/src/android/content/pm/cts/
DAttributionTest.java53 PackageInfo packageInfo = sContext.getPackageManager().getPackageInfo(PACKAGE_NAME, in dontGetAttributions() local
55 assertNotNull(packageInfo); in dontGetAttributions()
56 assertNull(packageInfo.attributions); in dontGetAttributions()
61 PackageInfo packageInfo = sContext.getPackageManager().getPackageInfo(PACKAGE_NAME, in getAttributionsAndVerify() local
63 assertNotNull(packageInfo); in getAttributionsAndVerify()
64 assertNotNull(packageInfo.attributions); in getAttributionsAndVerify()
65 assertEquals(packageInfo.attributions.length, NUM_ATTRIBUTIONS); in getAttributionsAndVerify()
67 assertEquals(packageInfo.attributions[i].getTag(), TAGS[i]); in getAttributionsAndVerify()
68 assertEquals(sContext.getString(packageInfo.attributions[i].getLabel()), LABELS[i]); in getAttributionsAndVerify()
DPackageInfoTest.java86 final PackageInfo packageInfo = new PackageInfo(); in testPackageInfoOp() local
87 assertEquals(0, packageInfo.describeContents()); in testPackageInfoOp()
88 assertNotNull(packageInfo.toString()); in testPackageInfoOp()
92 packageInfo.writeToParcel(p, 0); in testPackageInfoOp()
95 checkPkgInfoSame(packageInfo, packageInfoCmp); in testPackageInfoOp()
102 PackageInfo packageInfo = getPackageInfo(); in testApplicationInfoSame() local
103 ApplicationInfo ai = packageInfo.applicationInfo; in testApplicationInfoSame()
107 packageInfo.activities, packageInfo.services, packageInfo.providers, in testApplicationInfoSame()
108 packageInfo.receivers}) { in testApplicationInfoSame()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBaseDefaultPermissionGrantPolicyTest.java245 PackageInfo packageInfo = packageInfos.get(i); in getMsdkTargetingPackagesUsingRuntimePerms() local
246 if (packageInfo.requestedPermissions == null) { in getMsdkTargetingPackagesUsingRuntimePerms()
249 if (packageInfo.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) { in getMsdkTargetingPackagesUsingRuntimePerms()
252 for (String requestedPermission : packageInfo.requestedPermissions) { in getMsdkTargetingPackagesUsingRuntimePerms()
254 packageInfoMap.put(packageInfo.packageName, packageInfo); in getMsdkTargetingPackagesUsingRuntimePerms()
277 public static boolean isPackageOnSystemImage(PackageInfo packageInfo) { in isPackageOnSystemImage() argument
278 return (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; in isPackageOnSystemImage()
337 PackageInfo packageInfo = packageInfos.get(packageName); in addException() local
338 if (packageInfo == null) { in addException()
348 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.java53 PackageInfo packageInfo = mInstrumentation.getContext().getPackageManager() in testPocCVE_2021_0922() local
56 for (int i = 0; i < packageInfo.requestedPermissions.length; ++i) { in testPocCVE_2021_0922()
57 if ((packageInfo.requestedPermissionsFlags[i] in testPocCVE_2021_0922()
59 String permission = packageInfo.requestedPermissions[i]; in testPocCVE_2021_0922()
DPackageSignatureTest.java56 for (PackageInfo packageInfo : allPackageInfos) { in testPackageSignatures()
57 String packageName = packageInfo.packageName; in testPackageSignatures()
60 for (Signature signature : packageInfo.signatures) { in testPackageSignatures()
62 badPackages.add(packageInfo.packageName); in testPackageSignatures()
280 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, in writeSignature() local
283 int numSignatures = packageInfo.signatures.length; in writeSignature()
286 Signature signature = packageInfo.signatures[i]; in writeSignature()
/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.java79 PackageInfo packageInfo = packageManager.getPackageInfo(servicesExtensionPackage, 0); in testExtServicesPresent() local
82 (packageInfo.applicationInfo.flags in testExtServicesPresent()
141 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0); in enforceSharedLibPresentAndProperlyHosted() local
144 + requiredHostAppFlags, (packageInfo.applicationInfo.flags in enforceSharedLibPresentAndProperlyHosted()
148 + 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/appsearch/testutils/src/android/app/appsearch/testutil/
DPackageUtil.java38 PackageInfo packageInfo = context.getPackageManager().getPackageInfo( in getSelfPackageSha256Cert() local
40 SigningInfo signingInfo = packageInfo.signingInfo; in getSelfPackageSha256Cert()
/cts/hostsidetests/packagemanager/packagesetting/src/com/android/tests/packagesetting/host/
DPackageSettingTest.java67 PackageInfo packageInfo = getDevice().getAppPackageInfo(packageName); in getCodePathFromDumpsys() local
68 return packageInfo.getCodePath(); in getCodePathFromDumpsys()
95 PackageInfo packageInfo = getDevice().getAppPackageInfo(packageName); in getFirstInstallTimeForUserFromDumpsys() local
96 return packageInfo.getFirstInstallTime(userId); in getFirstInstallTimeForUserFromDumpsys()
/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()
/cts/tests/tests/car/src/android/car/cts/
DCarRemoteDeviceManagerTest.java130 PackageInfo packageInfo = mRemoteDeviceManager.getEndpointPackageInfo(zone); in testGetEndpointPackageInfo() local
135 if (packageInfo != null) { in testGetEndpointPackageInfo()
136 assertThat(packageInfo.packageName).isEqualTo(myPackageInfo.packageName); in testGetEndpointPackageInfo()
138 assertThat(signingInfoEquals(packageInfo.signingInfo, in testGetEndpointPackageInfo()
140 assertThat(packageInfo.getLongVersionCode()) in testGetEndpointPackageInfo()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodIconSamplerActivity.java86 PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), in getAppIcon() local
88 if (packageInfo.applicationInfo != null) { in getAppIcon()
89 return getResources().getDrawable(packageInfo.applicationInfo.icon); in getAppIcon()
/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/nene/src/main/java/com/android/bedstead/nene/bluetooth/
DBluetooth.java156 PackageInfo packageInfo; in findPackageName() local
158 packageInfo = in findPackageName()
169 if (packageInfo.activities == null) { in findPackageName()
172 for (var activity : packageInfo.activities) { in findPackageName()
/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/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/
DCheckers.java80 packages.removeIf(packageInfo -> packageInfo.packageName.equals("com.android.shell")); in numberOfSystemAppsWithPermission()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DUserControlDisabledPackagesTest.java105 PackageInfo packageInfo = mContext.getPackageManager() in isPackageStopped() local
108 boolean stopped = (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_STOPPED) in isPackageStopped()
112 + Integer.toHexString(packageInfo.applicationInfo.flags) + ". Stopped: " + stopped); in isPackageStopped()
/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/
DTestAppSystemServiceFactory.java163 PackageInfo packageInfo; in assertHasRequiredReceiver() local
165 packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_RECEIVERS); in assertHasRequiredReceiver()
171 int numberReceivers = (packageInfo.receivers == null ? 0 : packageInfo.receivers.length); in assertHasRequiredReceiver()
173 + ", info=" + packageInfo + ", receivers=" + numberReceivers); in assertHasRequiredReceiver()
175 if (packageInfo.receivers != null) { in assertHasRequiredReceiver()
176 for (ActivityInfo receiver : packageInfo.receivers) { in assertHasRequiredReceiver()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUSBRestrictRecordAActivity.java107 PackageInfo packageInfo = in hasRecordPermission() local
111 if (packageInfo.requestedPermissions != null) { in hasRecordPermission()
112 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/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DSessionParamsPermissionStateTest.kt245 val packageInfo = assertInstalled(GET_PERMISSIONS_FLAGS) in <lambda>() constant
247 assertPermission(packageInfo, permission, granted) in <lambda>()
251 private fun assertPermission(packageInfo: PackageInfo, name: String, granted: Boolean?) { in <lambda>()
252 val permissionIndex = packageInfo.requestedPermissions!!.indexOfFirst { it == name } in <lambda>()
/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()

12