/cts/hostsidetests/appsecurity/test-apps/PackageAccessApp/src/com/android/cts/packageaccessapp/ |
D | PackageAccessTest.java | 52 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_inUser() local 53 assertNotNull(pi); in testPackageAccess_inUser() 63 PackageInfo pi = pm.getPackageInfo(TINY_PKG, PackageManager.MATCH_UNINSTALLED_PACKAGES); in testPackageAccess_inUserUninstalled() local 64 assertNotNull(pi); in testPackageAccess_inUserUninstalled() 74 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_notInOtherUser() local 76 assertNull(pi); in testPackageAccess_notInOtherUser() 85 PackageInfo pi = pm.getPackageInfo(TINY_PKG, PackageManager.MATCH_UNINSTALLED_PACKAGES); in testPackageAccess_notInOtherUserUninstalled() local 87 assertNull(pi); in testPackageAccess_notInOtherUserUninstalled() 97 for (PackageInfo pi : packages) { in testPackageAccess_getPackagesCantSeeTiny() 98 if (TINY_PKG.equals(pi.packageName)) { in testPackageAccess_getPackagesCantSeeTiny() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/ |
D | V3RotationTest.java | 185 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNATURES); in testGetSignaturesShowsOld() local 186 assertNotNull("Failed to get signatures in PackageInfo of " + PKG, pi.signatures); in testGetSignaturesShowsOld() 188 1, pi.signatures.length); in testGetSignaturesShowsOld() 190 pi.signatures[0].toCharsString(), FIRST_CERT_HEX); in testGetSignaturesShowsOld() 197 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNING_CERTIFICATES); in testGetSigningCertificatesShowsAll() local 199 pi.signingInfo); in testGetSigningCertificatesShowsAll() 201 pi.signingInfo.hasMultipleSigners()); in testGetSigningCertificatesShowsAll() 202 Signature[] signingHistory = pi.signingInfo.getSigningCertificateHistory(); in testGetSigningCertificatesShowsAll() 228 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNING_CERTIFICATES); in testGetApkContentsSignersShowsCurrent() local 229 assertNotNull("Failed to get signatures in Package Info of " + PKG, pi.signingInfo); in testGetApkContentsSignersShowsCurrent() [all …]
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | InstallConstraintsTest.kt | 123 val pi = InstallUtils.getPackageInstaller() in <lambda>() constant 126 pi.checkInstallConstraints( in <lambda>() 140 val pi = InstallUtils.getPackageInstaller() in <lambda>() constant 142 pi.checkInstallConstraints( in <lambda>() 160 val pi = InstallUtils.getPackageInstaller() in <lambda>() constant 163 pi.checkInstallConstraints( in <lambda>() 177 pi.checkInstallConstraints( in <lambda>() 192 val pi = InstallUtils.getPackageInstaller() in <lambda>() constant 195 pi.checkInstallConstraints( in <lambda>() 209 pi.checkInstallConstraints( in <lambda>() [all …]
|
D | InstallInfoTest.kt | 51 val installInfo = pi.readInstallInfo(apk, 0) in <lambda>() 62 val installInfo = pi.readInstallInfo(it, apk.absolutePath, 0) in <lambda>() 77 val installInfo = pi.readInstallInfo(apk, 0) in <lambda>() 95 pi.readInstallInfo(apk, 0) in <lambda>() 108 pi.readInstallInfo(apk, 0) in <lambda>() 118 pi.readInstallInfo(apk, 0) in <lambda>()
|
D | SessionTest.kt | 78 val sessionId = pi.createSession(sessionParam) in sessionWithImmutablePendingIntent() 80 val session = pi.openSession(sessionId) in sessionWithImmutablePendingIntent() 83 pi.abandonSession(sessionId) in sessionWithImmutablePendingIntent() 250 val sessionId = pi.createSession(sessionParam) in withPrivilegedPermissions_canAccessResolvedPath() 251 val session = pi.openSession(sessionId) in withPrivilegedPermissions_canAccessResolvedPath() 256 sessionInfo = pi.getSessionInfo(sessionId) in withPrivilegedPermissions_canAccessResolvedPath() 264 sessionInfo = pi.getSessionInfo(sessionId) in withPrivilegedPermissions_canAccessResolvedPath() 273 val sessionId = pi.createSession(sessionParam) in withoutPrivilegedPermissions_cannotAccessResolvedPath() 274 val session = pi.openSession(sessionId) in withoutPrivilegedPermissions_cannotAccessResolvedPath() 277 val sessionInfo = pi.getSessionInfo(sessionId) in withoutPrivilegedPermissions_cannotAccessResolvedPath()
|
D | UpdateOwnershipEnforcementTestBase.kt | 82 pi.mySessions.forEach { in cleanUpSessions() 84 pi.abandonSession(it.sessionId) in cleanUpSessions()
|
/cts/tests/AlarmManager/src/android/alarmmanager/cts/ |
D | UidCapTests.java | 75 final PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, in sufficientAlarmsAllowedByDefault() local 77 mAlarmManager.set(ALARM_TYPES[i % ALARM_TYPES.length], Long.MAX_VALUE, pi); in sufficientAlarmsAllowedByDefault() 78 mAlarmsSet.add(pi); in sufficientAlarmsAllowedByDefault() 91 final PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, in alarmsCannotExceedLimit() local 93 mAlarmManager.set(ALARM_TYPES[i % ALARM_TYPES.length], Long.MAX_VALUE, pi); in alarmsCannotExceedLimit() 94 mAlarmsSet.add(pi); in alarmsCannotExceedLimit() 116 for (PendingIntent pi : mAlarmsSet) { in cancelAlarms() 117 mAlarmManager.cancel(pi); in cancelAlarms()
|
/cts/hostsidetests/media/app/MediaSessionTest/src/android/media/session/cts/ |
D | MediaSessionTest.java | 72 PendingIntent pi = PendingIntent.getActivity(mContext, /* requestCode */ 0, in setMediaButtonReceiver_withActivity_changeEnabled_throwsIAE() local 74 assertThat(pi.isActivity()).isTrue(); in setMediaButtonReceiver_withActivity_changeEnabled_throwsIAE() 78 () -> session.setMediaButtonReceiver(pi)); in setMediaButtonReceiver_withActivity_changeEnabled_throwsIAE() 89 PendingIntent pi = PendingIntent.getActivity(mContext, /* requestCode */ 0, in setMediaButtonReceiver_withActivity_changeDisabled_isIgnored() local 91 assertThat(pi.isActivity()).isTrue(); in setMediaButtonReceiver_withActivity_changeDisabled_isIgnored() 92 session.setMediaButtonReceiver(pi); in setMediaButtonReceiver_withActivity_changeDisabled_isIgnored()
|
/cts/tests/location/location_none/src/android/location/cts/none/ |
D | LocationDisabledAppOpsTest.java | 80 for (PackageInfo pi : pkgs) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 81 ApplicationInfo ai = pi.applicationInfo; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 89 isProvider[0] = mLm.isProviderPackage(null, pi.packageName, null); in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 91 if (mode[0] == MODE_ALLOWED && !ignoreList.containsAll(pi.packageName) in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 93 bypassedNoteOps.add(pi.packageName); in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 102 if (mode[0] == MODE_ALLOWED && !ignoreList.includes(pi.packageName) in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 104 bypassedCheckOps.add(pi.packageName); in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | ProviderInfoListTest.java | 37 final PackageInfo pi = pm.getPackageInfo(PACKAGE_NAME, in testApplicationInfoSquashed() local 42 assertNotNull(pi); in testApplicationInfoSquashed() 43 assertNotNull(pi.providers); in testApplicationInfoSquashed() 44 assertTrue(pi.providers.length > 1); in testApplicationInfoSquashed() 47 Collections.addAll(providers, pi.providers); in testApplicationInfoSquashed()
|
D | FeatureGroupInfoTest.java | 58 PackageInfo pi = mPackageManager.getPackageInfo(getContext().getPackageName(), in testFeatureGroupsAreCorrect() local 60 assertNotNull(pi); in testFeatureGroupsAreCorrect() 61 assertNotNull(pi.reqFeatures); in testFeatureGroupsAreCorrect() 62 assertNotNull(pi.featureGroups); in testFeatureGroupsAreCorrect() 64 assertFeatureInfosMatch(pi.reqFeatures, expectedFeatures); in testFeatureGroupsAreCorrect() 65 assertFeatureGroupsMatch(pi.featureGroups, expectedGroups); in testFeatureGroupsAreCorrect()
|
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/ |
D | BackgroundActivityLaunchTest.java | 435 PendingIntent pi = generatePendingIntent(serviceA, APP_A.BACKGROUND_ACTIVITY); in testPendingIntentActivityBlocked() local 436 sendPendingIntent(pi, serviceB); in testPendingIntentActivityBlocked() 466 PendingIntent pi = serviceB.generatePendingIntent(APP_B.BACKGROUND_ACTIVITY, in testPI_onlyCreatorAllowsBALInSameTask_isNotBlocked() local 470 serviceA.sendPendingIntentWithActivity(pi, Bundle.EMPTY); in testPI_onlyCreatorAllowsBALInSameTask_isNotBlocked() 490 PendingIntent pi = serviceB.generatePendingIntent(APP_B.BACKGROUND_ACTIVITY, in testPI_onlyCreatorAllowsBALInSameTask_isBlocked() local 494 serviceA.sendPendingIntentWithActivity(pi, Bundle.EMPTY); in testPI_onlyCreatorAllowsBALInSameTask_isBlocked() 513 PendingIntent pi = serviceB.generatePendingIntent(APP_B.BACKGROUND_ACTIVITY, in testPI_onlyCreatorAllowsBALwithOptIn_isNotBlocked() local 516 serviceA.sendPendingIntentWithActivity(pi, Bundle.EMPTY); in testPI_onlyCreatorAllowsBALwithOptIn_isNotBlocked() 536 PendingIntent pi = servicePiCreator.generatePendingIntent(APP_C.BACKGROUND_ACTIVITY, in testPI_onlyCreatorAllowsBALwithoutOptInSdk33_isNotBlocked() local 539 servicePiSender.sendPendingIntentWithActivity(pi, Bundle.EMPTY); in testPI_onlyCreatorAllowsBALwithoutOptInSdk33_isNotBlocked() [all …]
|
/cts/hostsidetests/packagemanager/packagesetting/app/src/com/android/tests/packagesetting/app/ |
D | PackageSettingDeviceTest.java | 38 PackageInfo pi = InstrumentationRegistry.getInstrumentation().getContext() in testCodePathMatchesExpected() local 40 String apkPath = pi.applicationInfo.sourceDir; in testCodePathMatchesExpected() 52 PackageInfo pi = packageManager.getPackageInfo(packageName, in testFirstInstallTimeMatchesExpected() local 54 Assert.assertTrue(Math.abs(expectedFirstInstallTime - pi.firstInstallTime) < 1000 /* ms */); in testFirstInstallTimeMatchesExpected()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | LocationDisabledAppOpsTest.java | 87 for (PackageInfo pi : pkgs) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 88 ApplicationInfo ai = pi.applicationInfo; in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 96 if (mode[0] == MODE_ALLOWED && !ignoreList.containsAll(pi.packageName)) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 97 bypassedNoteOps.add(pi.packageName); in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 106 if (mode[0] == MODE_ALLOWED && !ignoreList.includes(pi.packageName)) { in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled() 107 bypassedCheckOps.add(pi.packageName); in testLocationAppOpIsIgnoredForAppsWhenLocationIsDisabled()
|
D | CVE_2020_0294.java | 55 PendingIntent pi = activityManager.getRunningServiceControlPanel(componentName); in testPocCVE_2020_0294() local 56 assumeNotNull(pi); in testPocCVE_2020_0294() 65 pi.send(targetContext, 0, spuriousIntent, null, null); in testPocCVE_2020_0294()
|
/cts/tests/app/src/android/app/cts/ |
D | PendingIntentTest.java | 74 public void onSendFinished(PendingIntent pi, Intent intent, int resultCode, in setUp() 396 PendingIntent pi; in testUpdateCurrent() local 400 pi = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_IMMUTABLE); in testUpdateCurrent() 404 pi.send(); in testUpdateCurrent() 413 pi = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_IMMUTABLE); in testUpdateCurrent() 415 pi.send(); in testUpdateCurrent() 421 pi = PendingIntent.getBroadcast(context, 0, intent, in testUpdateCurrent() 424 pi.send(); in testUpdateCurrent() 428 pi.cancel(); in testUpdateCurrent() 887 (pi) -> pi.queryIntentComponents(0)); in testGetIntentComponentAndType() [all …]
|
D | RecoverableSecurityExceptionTest.java | 51 final PendingIntent pi = PendingIntent.getActivity(getContext(), 42, in build() local 54 new RemoteAction(Icon.createWithFilePath("/dev/null"), "title", "content", pi)); in build()
|
/cts/tests/tests/app/src/android/app/cts/ |
D | KeyguardInitialLockTest.java | 47 for (PackageInfo pi : holding) { in testSetInitialLockPermission() 48 if (!allowedPackages.contains(pi.packageName)) { in testSetInitialLockPermission() 49 fail("The SET_INITIAL_LOCK permission must not be held by " + pi.packageName in testSetInitialLockPermission()
|
/cts/hostsidetests/devicepolicy/app/DeviceAdmin/src/com.android.cts.deviceadmin/ |
D | DeviceAdminTest.java | 37 final PackageInfo pi = pm.getPackageInfo(mContext.getPackageName(), /* flags =*/ 0); in testTargetApiLevel() local 39 assertTrue(getTargetApiLevel() == pi.applicationInfo.targetSdkVersion || in testTargetApiLevel() 40 Build.VERSION_CODES.CUR_DEVELOPMENT == pi.applicationInfo.targetSdkVersion); in testTargetApiLevel()
|
/cts/hostsidetests/appsecurity/test-apps/MajorVersionApp/src-common/com/android/cts/majorversion/ |
D | VersionTest.java | 35 PackageInfo pi = pm.getPackageInfo(InstrumentationRegistry.getContext().getPackageName(), in testCheckVersion() local 39 assertEquals(VersionConstants.PACKAGE_VERSION, pi.getLongVersionCode()); in testCheckVersion()
|
/cts/tests/framework/base/windowmanager/backgroundactivity/TestApp/src/android/server/wm/backgroundactivity/appa/ |
D | ForegroundActivity.java | 81 for (PendingIntent pi : pendingIntents) { 84 startIntentSenderForResult(pi.getIntentSender(), requestCode, null, 96 for (PendingIntent pi : pendingIntents) { 98 startIntentSender(pi.getIntentSender(), null, 0, 0, 0);
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39797/test-app/src/android/security/cts/CVE_2021_39797_test/ |
D | PocActivity.java | 72 PendingIntent pi; in onCreate() local 74 pi = (PendingIntent) method.invoke(getSystemService(LauncherApps.class), in onCreate() 82 if (pi == null) { in onCreate() 93 startIntentSender(pi.getIntentSender(), null, 0, 0, 0, sendOptions); in onCreate()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | PackageDeviceInfo.java | 196 final PermissionInfo pi = pm.getPermissionInfo(permission, 0); in collectRequestedPermissions() local 199 writePermissionsDetails(pi, store, systemPermissions); in collectRequestedPermissions() 286 private static void writePermissionsDetails(PermissionInfo pi, in writePermissionsDetails() argument 289 final String permissionName = pi.name; in writePermissionsDetails() 293 store.addResult(PERMISSION_FLAGS, pi.flags); in writePermissionsDetails() 298 store.addResult(PERMISSION_GROUP, pi.group); in writePermissionsDetails() 301 store.addResult(PERMISSION_PROTECTION, pi.getProtection()); in writePermissionsDetails() 302 store.addResult(PERMISSION_PROTECTION_FLAGS, pi.getProtectionFlags()); in writePermissionsDetails() 305 pi.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE); in writePermissionsDetails() 307 pi.protectionLevel & ~PermissionInfo.PROTECTION_MASK_BASE); in writePermissionsDetails()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0441/src/android/security/cts/CVE_2021_0441/ |
D | PocActivity.java | 48 PendingIntent pi = MediaStore.createDeleteRequest(getContentResolver(), uriList); in requestDeletePermission() local 50 startIntentSenderForResult(pi.getIntentSender(), in requestDeletePermission()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | CrossProcessExceptionService.java | 71 final PendingIntent pi = PendingIntent.getActivity( in onBind() local 76 … throw new AuthenticationRequiredException(new FileNotFoundException("FNFE"), pi); in onBind()
|