/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; 54 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_currentUser() local 56 pm.getInstalledPackagesAsUser(0, mContext.getUserId()); in testPackageVisibility_currentUser() 63 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserGrant() local 65 pm.getInstalledPackagesAsUser(MATCH_KNOWN_PACKAGES, mContext.getUserId()); in testPackageVisibility_anyUserCrossUserGrant() 72 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserNoGrant() local 76 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; 87 PackageManager pm = getContext().getPackageManager(); in testHasPerm() local 89 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm() 94 PackageManager pm = getContext().getPackageManager(); in testHasNoPerm() local 96 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm() 104 PackageManager pm = getContext().getPackageManager(); in testGetSignaturesShowsOld() local 105 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNATURES); in testGetSignaturesShowsOld() 116 PackageManager pm = getContext().getPackageManager(); in testGetSigningCertificatesShowsAll() local [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PermissionFeatureTest.java | 17 package android.content.pm.cts; 19 import android.content.pm.PackageManager; 26 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureDefined() local 28 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_DEFINED", in testPermissionRequiredFeatureDefined() 33 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureUndefined() local 35 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_UNDEFINED", in testPermissionRequiredFeatureUndefined() 40 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureDefined() local 42 pm.checkPermission("android.content.cts.REQUIRED_NOT_FEATURE_DEFINED", in testPermissionRequiredNotFeatureDefined() 47 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureUndefined() local 49 pm.checkPermission("android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED", in testPermissionRequiredNotFeatureUndefined() [all …]
|
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 | 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 | 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 | 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()
|
D | ComponentInfoTest.java | 17 package android.content.pm.cts; 19 import android.content.pm.ApplicationInfo; 20 import android.content.pm.ComponentInfo; 21 import android.content.pm.PackageManager; 22 import android.content.pm.PackageManager.NameNotFoundException; 83 PackageManager pm = mContext.getPackageManager(); in testLoadIcon() local 84 assertNotNull(pm); in testLoadIcon() 86 Drawable defaultIcon = pm.getDefaultActivityIcon(); in testLoadIcon() 89 d = mComponentInfo.loadIcon(pm); in testLoadIcon() 94 d2 = mComponentInfo.loadIcon(pm); in testLoadIcon() [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/provider/src/android/provider/cts/ |
D | WifiSliceTest.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 28 import android.content.pm.PackageManager; 29 import android.content.pm.PackageManager.NameNotFoundException; 30 import android.content.pm.ResolveInfo; 103 final PackageManager pm = mContext.getPackageManager(); in wifiSlice_grantedPermissionToDefaultAssistant() local 107 final ResolveInfo info = pm.resolveActivity(requestDefaultAssistant, 0); in wifiSlice_grantedPermissionToDefaultAssistant() 111 final int testUid = pm.getPackageUid(info.activityInfo.packageName, 0); in wifiSlice_grantedPermissionToDefaultAssistant() 124 final PackageManager pm = mContext.getPackageManager(); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() local 128 final ResolveInfo info = pm.resolveActivity(requestDefaultAssistant, 0); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() 132 final int testUid = pm.getPackageUid(info.activityInfo.packageName, 0); in wifiSlice_grantedPermissionToDefaultVoiceAssistant() [all …]
|
/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/security/src/android/security/cts/ |
D | VerifiedBootTest.java | 19 import android.content.pm.PackageManager; 29 private static boolean isLowRamExempt(PackageManager pm) { in isLowRamExempt() argument 30 if (pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL)) { in isLowRamExempt() 49 PackageManager pm = getContext().getPackageManager(); in testVerifiedBootSupport() local 50 assertNotNull("PackageManager must not be null", pm); in testVerifiedBootSupport() 51 if (isLowRamExempt(pm)) { in testVerifiedBootSupport() 55 pm.hasSystemFeature(PackageManager.FEATURE_VERIFIED_BOOT)); in testVerifiedBootSupport()
|
/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/hostsidetests/incident/src/com/android/server/cts/ |
D | MemInfoIncidentTest.java | 38 for (ProcessMemory pm : dump.getNativeProcessesList()) { in verifyMemInfoDumpProto() 39 testProcessMemory(pm); in verifyMemInfoDumpProto() 85 private static void testProcessMemory(ProcessMemory pm) throws Exception { in testProcessMemory() argument 86 assertNotNull(pm); in testProcessMemory() 88 assertTrue(0 < pm.getPid()); in testProcessMemory() 91 assertTrue(4194304 >= pm.getPid()); in testProcessMemory() 93 testHeapInfo(pm.getNativeHeap()); in testProcessMemory() 94 testHeapInfo(pm.getDalvikHeap()); in testProcessMemory() 96 for (ProcessMemory.MemoryInfo mi : pm.getOtherHeapsList()) { in testProcessMemory() 99 testMemoryInfo(pm.getUnknownHeap()); in testProcessMemory() [all …]
|
/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; 66 PackageManager pm = getInstrumentation().getContext().getPackageManager(); in getApplicationFlags() local 68 ApplicationInfo aInfo = pm.getApplicationInfo(PRIVILEGED_SHIM_PKG, in getApplicationFlags() 77 PackageManager pm = getInstrumentation().getContext().getPackageManager(); in assertPackageEnabledState() local 78 int state = pm.getApplicationEnabledSetting(packageName); in assertPackageEnabledState()
|
/cts/tests/simplecpu/jni/ |
D | CpuNativeJni.cpp | 77 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; in qsort_local() local 84 for (pm = (char *)a + es; pm < (char *) a + n * es; pm += es) in qsort_local() 85 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in qsort_local() 90 pm = (char *)a + (n / 2) * es; in qsort_local() 97 pm = med3(pm - d, pm, pm + d, cmp); in qsort_local() 100 pm = med3(pl, pm, pn, cmp); in qsort_local() 102 swap(a, pm); in qsort_local() 131 for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) in qsort_local() 132 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in qsort_local()
|
/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; 91 final PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testNoPackageInfoAccess() local 92 final String packageName = pm.getServicesSystemSharedLibraryPackageName(); in testNoPackageInfoAccess() 93 pm.getPackageInfo(packageName, 0); in testNoPackageInfoAccess()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | PackageDeviceInfo.java | 22 import android.content.pm.ApplicationInfo; 23 import android.content.pm.PackageInfo; 24 import android.content.pm.PackageManager; 25 import android.content.pm.PermissionInfo; 78 final PackageManager pm = getContext().getPackageManager(); in collectDeviceInfo() local 81 pm.getInstalledPackages(PackageManager.GET_PERMISSIONS); in collectDeviceInfo() 95 collectPermissions(store, pm, pkg); in collectDeviceInfo() 96 collectionApplicationInfo(store, pm, pkg); in collectDeviceInfo() 120 PackageManager pm, in collectPermissions() argument 127 final PermissionInfo pi = pm.getPermissionInfo(permission, 0); in collectPermissions() [all …]
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | SessionTest.kt | 20 import android.content.pm.ApplicationInfo.CATEGORY_MAPS 21 import android.content.pm.ApplicationInfo.CATEGORY_UNDEFINED 22 import android.content.pm.PackageInstaller.STATUS_FAILURE_ABORTED 23 import android.content.pm.PackageInstaller.STATUS_SUCCESS 41 private val pm = context.packageManager constant in android.packageinstaller.install.cts.SessionTest 79 assertEquals(CATEGORY_UNDEFINED, pm.getApplicationInfo(TEST_APK_PACKAGE_NAME, 0).category) in setAppCategory() 82 pm.setApplicationCategoryHint(TEST_APK_PACKAGE_NAME, CATEGORY_MAPS) in setAppCategory() 84 assertEquals(CATEGORY_MAPS, pm.getApplicationInfo(TEST_APK_PACKAGE_NAME, 0).category) in setAppCategory()
|