/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/ |
D | CookieTest.java | 24 import android.content.pm.PackageManager; 36 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookieUpdateAndRetrieval() local 39 assertTrue(pm.isInstantApp()); in testCookieUpdateAndRetrieval() 42 assertTrue(pm.getInstantAppCookieMaxBytes() > 0); in testCookieUpdateAndRetrieval() 45 byte[] cookie = pm.getInstantAppCookie(); in testCookieUpdateAndRetrieval() 49 pm.updateInstantAppCookie("1".getBytes()); in testCookieUpdateAndRetrieval() 53 pm.updateInstantAppCookie( in testCookieUpdateAndRetrieval() 54 new byte[pm.getInstantAppCookieMaxBytes() + 1]); in testCookieUpdateAndRetrieval() 61 assertEquals("1", new String(pm.getInstantAppCookie())); in testCookieUpdateAndRetrieval() 66 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedAcrossInstantInstalls1() local [all …]
|
/cts/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/src/com/android/cts/applicationvisibility/ |
D | ApplicationVisibilityCrossUserTest.java | 18 import static android.content.pm.PackageManager.MATCH_KNOWN_PACKAGES; 26 import android.content.pm.ApplicationInfo; 27 import android.content.pm.PackageInfo; 28 import android.content.pm.PackageManager; 56 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_currentUser() local 58 pm.getInstalledPackagesAsUser(0, mContext.getUserId()); in testPackageVisibility_currentUser() 65 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserGrant() local 67 pm.getInstalledPackagesAsUser(MATCH_KNOWN_PACKAGES, mContext.getUserId()); in testPackageVisibility_anyUserCrossUserGrant() 74 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserNoGrant() local 78 pm.getInstalledPackagesAsUser(MATCH_KNOWN_PACKAGES, mContext.getUserId()); in testPackageVisibility_anyUserCrossUserNoGrant() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/ |
D | V3RotationTest.java | 19 import android.content.pm.PackageInfo; 20 import android.content.pm.PackageManager; 21 import android.content.pm.Signature; 120 PackageManager pm = getContext().getPackageManager(); in testHasPerm() local 122 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm() 127 PackageManager pm = getContext().getPackageManager(); in testHasNoPerm() local 129 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm() 137 PackageManager pm = getContext().getPackageManager(); in testGetSignaturesShowsOld() local 138 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNATURES); in testGetSignaturesShowsOld() 149 PackageManager pm = getContext().getPackageManager(); in testGetSigningCertificatesShowsAll() local [all …]
|
/cts/hostsidetests/appsecurity/test-apps/PackageAccessApp/src/com/android/cts/packageaccessapp/ |
D | PackageAccessTest.java | 22 import android.content.pm.PackageInfo; 23 import android.content.pm.PackageManager; 24 import android.content.pm.PackageManager.NameNotFoundException; 50 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_inUser() local 52 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_inUser() 61 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_inUserUninstalled() local 63 PackageInfo pi = pm.getPackageInfo(TINY_PKG, PackageManager.MATCH_UNINSTALLED_PACKAGES); in testPackageAccess_inUserUninstalled() 72 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_notInOtherUser() local 74 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_notInOtherUser() 83 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_notInOtherUserUninstalled() local [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageItemInfo_DisplayNameComparatorTest.java | 17 package android.content.pm.cts; 21 import android.content.pm.ActivityInfo; 22 import android.content.pm.PackageItemInfo; 23 import android.content.pm.PackageManager; 24 import android.content.pm.PackageItemInfo.DisplayNameComparator; 25 import android.content.pm.PackageManager.NameNotFoundException; 36 PackageManager pm = getContext().getPackageManager(); in testDisplayNameComparator() local 37 DisplayNameComparator comparator = new DisplayNameComparator(pm); in testDisplayNameComparator() 40 ActivityInfo activityInfo = pm.getActivityInfo(componentName, 0); in testDisplayNameComparator() 44 activityInfo = pm.getActivityInfo(componentName, 0); in testDisplayNameComparator()
|
D | ApplicationInfo_DisplayNameComparatorTest.java | 17 package android.content.pm.cts; 19 import android.content.pm.ApplicationInfo; 20 import android.content.pm.PackageManager; 21 import android.content.pm.ApplicationInfo.DisplayNameComparator; 22 import android.content.pm.PackageManager.NameNotFoundException; 39 PackageManager pm = getContext().getPackageManager(); in testConstructor() local 40 new DisplayNameComparator(pm); in testConstructor() 46 PackageManager pm = getContext().getPackageManager(); in testCompare() local 47 mDisplayNameComparator = new ApplicationInfo.DisplayNameComparator(pm); in testCompare()
|
D | PermissionGroupInfoTest.java | 17 package android.content.pm.cts; 20 import android.content.pm.PackageManager; 21 import android.content.pm.PermissionGroupInfo; 22 import android.content.pm.PackageManager.NameNotFoundException; 34 PackageManager pm = getContext().getPackageManager(); in testPermissionGroupInfo() local 38 PermissionGroupInfo permissionGroupInfo = pm in testPermissionGroupInfo() 46 assertEquals(GROUP_NAME, permissionGroupInfo.loadLabel(pm)); in testPermissionGroupInfo() 47 assertEquals(GROUP_DESCRIPTION, permissionGroupInfo.loadDescription(pm)); in testPermissionGroupInfo()
|
D | InstallSessionParamsUnitTest.java | 17 package android.content.pm.cts; 19 import static android.content.pm.PackageInfo.INSTALL_LOCATION_AUTO; 20 import static android.content.pm.PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY; 21 import static android.content.pm.PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL; 22 import static android.content.pm.PackageInfo.INSTALL_LOCATION_UNSPECIFIED; 23 import static android.content.pm.PackageInstaller.SessionParams.MODE_FULL_INSTALL; 24 import static android.content.pm.PackageInstaller.SessionParams.MODE_INHERIT_EXISTING; 25 import static android.content.pm.PackageManager.INSTALL_REASON_DEVICE_RESTORE; 26 import static android.content.pm.PackageManager.INSTALL_REASON_DEVICE_SETUP; 27 import static android.content.pm.PackageManager.INSTALL_REASON_POLICY; [all …]
|
D | ResolveInfoTest.java | 17 package android.content.pm.cts; 22 import android.content.pm.PackageManager; 23 import android.content.pm.ResolveInfo; 40 PackageManager pm = getContext().getPackageManager(); in testResolveInfo() local 43 ResolveInfo resolveInfo = pm.resolveActivity(intent, 0); in testResolveInfo() 46 assertEquals(expectedLabel, resolveInfo.loadLabel(pm).toString()); in testResolveInfo() 47 assertNotNull(resolveInfo.loadIcon(pm)); in testResolveInfo() 54 PackageManager pm = getContext().getPackageManager(); in testDump() local 56 ResolveInfo resolveInfo = pm.resolveService(intent, PackageManager.GET_RESOLVED_FILTER); in testDump()
|
D | PermissionFeatureTest.java | 17 package android.content.pm.cts; 19 import android.content.pm.PackageManager; 74 final PackageManager pm = getContext().getPackageManager(); in assertPermissionGranted() local 76 pm.checkPermission(permName, getContext().getPackageName())); in assertPermissionGranted() 80 final PackageManager pm = getContext().getPackageManager(); in assertPermissionDenied() local 82 pm.checkPermission(permName, getContext().getPackageName())); in assertPermissionDenied()
|
D | PermissionInfoTest.java | 17 package android.content.pm.cts; 20 import android.content.pm.PackageManager; 21 import android.content.pm.PermissionInfo; 22 import android.content.pm.PackageManager.NameNotFoundException; 36 PackageManager pm = getContext().getPackageManager(); in testPermissionInfo() local 40 PermissionInfo permissionInfo = pm.getPermissionInfo(PERMISSION_NAME, 0); in testPermissionInfo() 47 assertEquals(DEFAULT_DISCPRIPTION, permissionInfo.loadDescription(pm)); in testPermissionInfo()
|
D | ProviderInfoListTest.java | 17 package android.content.pm.cts; 19 import android.content.pm.PackageInfo; 20 import android.content.pm.PackageManager; 21 import android.content.pm.ProviderInfo; 22 import android.content.pm.ProviderInfoList; 34 final PackageManager pm = getContext().getPackageManager(); in testApplicationInfoSquashed() local 35 final PackageInfo pi = pm.getPackageInfo(PACKAGE_NAME, in testApplicationInfoSquashed()
|
D | ConfigurationInfoTest.java | 17 package android.content.pm.cts; 20 import android.content.pm.ConfigurationInfo; 21 import android.content.pm.PackageInfo; 22 import android.content.pm.PackageManager; 23 import android.content.pm.PackageManager.NameNotFoundException; 31 PackageManager pm = getContext().getPackageManager(); in testConfigPreferences() local 35 PackageInfo pkgInfo = pm.getPackageInfo(getContext().getPackageName(), in testConfigPreferences()
|
/cts/tests/app/src/android/app/cts/ |
D | WallpaperInfoTest.java | 26 import android.content.pm.PackageManager; 27 import android.content.pm.ResolveInfo; 46 PackageManager pm = context.getPackageManager(); in test() local 47 List<ResolveInfo> result = pm.queryIntentServices(intent, PackageManager.GET_META_DATA); in test() 51 assertEquals(context.getString(R.string.wallpaper_title), wallpaperInfo.loadLabel(pm)); in test() 53 wallpaperInfo.loadDescription(pm)); in test() 55 wallpaperInfo.loadAuthor(pm)); in test() 57 wallpaperInfo.loadContextDescription(pm)); in test() 59 wallpaperInfo.loadContextUri(pm).toString()); in test() 64 assertNotNull(wallpaperInfo.loadIcon(pm)); in test() [all …]
|
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ |
D | ShortcutManagerSpoofingTest.java | 16 package android.content.pm.cts.shortcutmanager; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackNotR… 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackRece… 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.checkAssertSuccess; 22 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.dumpsysShortcut; 23 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 24 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.resetAll; 25 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.setDefaultLauncher; 26 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.waitUntil; [all …]
|
D | ShortcutManagerRequestPinTest.java | 16 package android.content.pm.cts.shortcutmanager; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.dumpsysShortcut; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.retryUntil; 22 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.setDefaultLauncher; 26 import android.content.pm.ActivityInfo; 27 import android.content.pm.LauncherApps.ShortcutQuery; 28 import android.content.pm.PackageManager; 29 import android.content.pm.ResolveInfo; [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/mainline/ |
D | ModuleDetector.java | 18 import android.content.pm.PackageInfo; 19 import android.content.pm.PackageManager; 50 public static boolean moduleIsPlayManaged(PackageManager pm, MainlineModule module) in moduleIsPlayManaged() argument 52 return getPlayManagedModules(pm).contains(module); in moduleIsPlayManaged() 59 public static Set<MainlineModule> getPlayManagedModules(PackageManager pm) throws Exception { in getPlayManagedModules() argument 63 for (PackageInfo info : pm.getInstalledPackages(0)) { in getPlayManagedModules() 66 for (PackageInfo info : pm.getInstalledPackages(PackageManager.MATCH_APEX)) { in getPlayManagedModules() 72 && module.certSHA256.equals(getSignatureDigest(pm, module))) { in getPlayManagedModules() 79 private static String getSignatureDigest(PackageManager pm, MainlineModule module) in getSignatureDigest() argument 86 PackageInfo packageInfo = pm.getPackageInfo(module.packageName, flag); in getSignatureDigest()
|
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/ |
D | TextClassifierPolicyTest.java | 5 import android.content.pm.PackageManager; 18 PackageManager pm = ApplicationProvider.getApplicationContext().getPackageManager(); in isDefaultTextClassifierPackageKnown() local 19 String defaultTextClassifierPackageName = pm.getDefaultTextClassifierPackageName(); in isDefaultTextClassifierPackageKnown() 20 String extensionServicesPackageName = pm.getServicesSystemSharedLibraryPackageName(); in isDefaultTextClassifierPackageKnown() 31 PackageManager pm = ApplicationProvider.getApplicationContext().getPackageManager(); in defaultTextClassifierIsNotTheSameAsSystemTextClassifier() local 32 String defaultTextClassifierPackageName = pm.getDefaultTextClassifierPackageName(); in defaultTextClassifierIsNotTheSameAsSystemTextClassifier() 33 String systemTextClassifierPackageName = pm.getSystemTextClassifierPackageName(); in defaultTextClassifierIsNotTheSameAsSystemTextClassifier()
|
/cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/src/com/android/cts/privilegedupdate/ |
D | PrivilegedAppDisableTest.java | 23 import android.content.pm.ApplicationInfo; 24 import android.content.pm.PackageManager; 25 import android.content.pm.ResolveInfo; 26 import android.content.pm.PackageManager.NameNotFoundException; 64 PackageManager pm = getInstrumentation().getContext().getPackageManager(); in getApplicationFlags() local 66 ApplicationInfo aInfo = pm.getApplicationInfo(PRIVILEGED_SHIM_PKG, in getApplicationFlags() 75 PackageManager pm = getInstrumentation().getContext().getPackageManager(); in assertPackageEnabledState() local 76 int state = pm.getApplicationEnabledSetting(packageName); in assertPackageEnabledState()
|
/cts/tests/tests/settings/src/android/settings/cts/ |
D | WifiSliceTest.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 29 import android.content.pm.PackageManager; 30 import android.content.pm.PackageManager.NameNotFoundException; 31 import android.content.pm.ResolveInfo; 118 final PackageManager pm = mContext.getPackageManager(); in wifiSlice_grantedPermissionToDefaultAssistant() local 122 final List<ResolveInfo> infos = pm.queryIntentActivities(requestDefaultAssistant, 0); in wifiSlice_grantedPermissionToDefaultAssistant() 136 final int testUid = pm.getPackageUid(packageName, 0); in wifiSlice_grantedPermissionToDefaultAssistant() 149 final PackageManager pm = mContext.getPackageManager(); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() local 153 final ResolveInfo info = pm.resolveActivity(requestDefaultAssistant, 0); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() 157 final int testUid = pm.getPackageUid(info.activityInfo.packageName, 0); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() [all …]
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | SessionTest.kt | 19 import android.content.pm.ApplicationInfo.CATEGORY_MAPS 20 import android.content.pm.ApplicationInfo.CATEGORY_UNDEFINED 21 import android.content.pm.PackageInstaller.STATUS_FAILURE_ABORTED 22 import android.content.pm.PackageInstaller.STATUS_SUCCESS 42 private val pm = context.packageManager constant in android.packageinstaller.install.cts.SessionTest 45 val excludeWatch = ExcludeWatch("Installing APKs not supported on watch", pm) 76 assertEquals(CATEGORY_UNDEFINED, pm.getApplicationInfo(TEST_APK_PACKAGE_NAME, 0).category) in setAppCategory() 79 pm.setApplicationCategoryHint(TEST_APK_PACKAGE_NAME, CATEGORY_MAPS) in setAppCategory() 81 assertEquals(CATEGORY_MAPS, pm.getApplicationInfo(TEST_APK_PACKAGE_NAME, 0).category) in setAppCategory()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | VerifiedBootTest.java | 24 import android.content.pm.PackageManager; 54 private static boolean isLowRamExempt(PackageManager pm) { in isLowRamExempt() argument 55 if (pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL)) { in isLowRamExempt() 75 PackageManager pm = mContext.getPackageManager(); in testVerifiedBootSupport() local 76 assertNotNull("PackageManager must not be null", pm); in testVerifiedBootSupport() 77 if (isLowRamExempt(pm)) { in testVerifiedBootSupport() 81 pm.hasSystemFeature(PackageManager.FEATURE_VERIFIED_BOOT)); in testVerifiedBootSupport()
|
/cts/tests/mediapc/src/android/mediapc/cts/ |
D | PerformanceClassTest.java | 23 import android.content.pm.PackageManager; 47 PackageManager pm = in isHandheld() local 49 return pm.hasSystemFeature(pm.FEATURE_TOUCHSCREEN) in isHandheld() 50 && !pm.hasSystemFeature(pm.FEATURE_WATCH) in isHandheld() 51 && !pm.hasSystemFeature(pm.FEATURE_TELEVISION) in isHandheld() 52 && !pm.hasSystemFeature(pm.FEATURE_AUTOMOTIVE); in isHandheld()
|
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/ |
D | DocumentsClientTestCase.java | 31 import android.content.pm.PackageManager; 32 import android.content.pm.ResolveInfo; 66 final PackageManager pm = getInstrumentation().getContext().getPackageManager(); in setUp() local 71 final ResolveInfo ri = pm.resolveActivity(intent, 0); in setUp() 155 final PackageManager pm = getInstrumentation().getContext().getPackageManager(); in supportedHardware() local 156 if (pm.hasSystemFeature("android.hardware.type.television") in supportedHardware() 157 || pm.hasSystemFeature("android.hardware.type.watch") in supportedHardware() 158 || pm.hasSystemFeature("android.hardware.type.automotive")) { in supportedHardware() 165 final PackageManager pm = getInstrumentation().getContext().getPackageManager(); in supportedHardwareForScopedDirectoryAccess() local 166 if (pm.hasSystemFeature("android.hardware.type.television") in supportedHardwareForScopedDirectoryAccess() [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | RequiredComponentsTest.java | 19 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE; 20 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; 21 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY; 27 import android.content.pm.ApplicationInfo; 28 import android.content.pm.PackageInfo; 29 import android.content.pm.PackageManager; 30 import android.content.pm.ResolveInfo; 96 final PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testNoPackageInfoAccess() local 97 final String packageName = pm.getServicesSystemSharedLibraryPackageName(); in testNoPackageInfoAccess() 98 pm.getPackageInfo(packageName, 0); in testNoPackageInfoAccess()
|