/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/ |
D | CookieTest.java | 19 import android.content.pm.PackageManager; 34 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookieUpdateAndRetrieval() local 37 assertTrue(pm.isInstantApp()); in testCookieUpdateAndRetrieval() 40 assertTrue(pm.getInstantAppCookieMaxBytes() > 0); in testCookieUpdateAndRetrieval() 43 byte[] cookie = pm.getInstantAppCookie(); in testCookieUpdateAndRetrieval() 47 pm.updateInstantAppCookie("1".getBytes()); in testCookieUpdateAndRetrieval() 51 pm.updateInstantAppCookie( in testCookieUpdateAndRetrieval() 52 new byte[pm.getInstantAppCookieMaxBytes() + 1]); in testCookieUpdateAndRetrieval() 59 assertEquals("1", new String(pm.getInstantAppCookie())); in testCookieUpdateAndRetrieval() 64 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedAcrossInstantInstalls1() 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; 24 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureDefined() local 26 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_DEFINED", in testPermissionRequiredFeatureDefined() 31 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureUndefined() local 33 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_UNDEFINED", in testPermissionRequiredFeatureUndefined() 38 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureDefined() local 40 pm.checkPermission("android.content.cts.REQUIRED_NOT_FEATURE_DEFINED", in testPermissionRequiredNotFeatureDefined() 45 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureUndefined() local 47 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; 34 PackageManager pm = getContext().getPackageManager(); in testDisplayNameComparator() local 35 DisplayNameComparator comparator = new DisplayNameComparator(pm); in testDisplayNameComparator() 38 ActivityInfo activityInfo = pm.getActivityInfo(componentName, 0); in testDisplayNameComparator() 42 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; 32 PackageManager pm = getContext().getPackageManager(); in testPermissionGroupInfo() local 36 PermissionGroupInfo permissionGroupInfo = pm in testPermissionGroupInfo() 44 assertEquals(GROUP_NAME, permissionGroupInfo.loadLabel(pm)); in testPermissionGroupInfo() 45 assertEquals(GROUP_DESCRIPTION, permissionGroupInfo.loadDescription(pm)); in testPermissionGroupInfo()
|
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; 34 PackageManager pm = getContext().getPackageManager(); in testPermissionInfo() local 38 PermissionInfo permissionInfo = pm.getPermissionInfo(PERMISSION_NAME, 0); in testPermissionInfo() 45 assertEquals(DEFAULT_DISCPRIPTION, permissionInfo.loadDescription(pm)); in testPermissionInfo()
|
D | ResolveInfoTest.java | 17 package android.content.pm.cts; 22 import android.content.pm.PackageManager; 23 import android.content.pm.ResolveInfo; 38 PackageManager pm = getContext().getPackageManager(); in testResolveInfo() local 41 ResolveInfo resolveInfo = pm.resolveActivity(intent, 0); in testResolveInfo() 44 assertEquals(expectedLabel, resolveInfo.loadLabel(pm).toString()); in testResolveInfo() 45 assertNotNull(resolveInfo.loadIcon(pm)); in testResolveInfo() 52 PackageManager pm = getContext().getPackageManager(); in testDump() local 54 ResolveInfo resolveInfo = pm.resolveService(intent, PackageManager.GET_RESOLVED_FILTER); in testDump()
|
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; 29 PackageManager pm = getContext().getPackageManager(); in testConfigPreferences() local 33 PackageInfo pkgInfo = pm.getPackageInfo(getContext().getPackageName(), in testConfigPreferences()
|
D | ServiceInfoTest.java | 17 package android.content.pm.cts; 21 import android.content.pm.PackageManager; 22 import android.content.pm.ServiceInfo; 23 import android.content.pm.PackageManager.NameNotFoundException; 32 PackageManager pm = getContext().getPackageManager(); in testServiceInfo() local 39 ServiceInfo serviceInfo = pm.getServiceInfo(componentName, 0); in testServiceInfo()
|
/cts/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/src/com/android/cts/applicationvisibility/ |
D | ApplicationVisibilityCrossUserTest.java | 21 import static android.content.pm.PackageManager.MATCH_KNOWN_PACKAGES; 24 import android.content.pm.ApplicationInfo; 25 import android.content.pm.PackageInfo; 26 import android.content.pm.PackageManager; 50 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_currentUser() local 52 pm.getInstalledPackagesAsUser(0, mContext.getUserId()); in testPackageVisibility_currentUser() 59 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserGrant() local 61 pm.getInstalledPackagesAsUser(MATCH_KNOWN_PACKAGES, mContext.getUserId()); in testPackageVisibility_anyUserCrossUserGrant() 68 final PackageManager pm = mContext.getPackageManager(); in testPackageVisibility_anyUserCrossUserNoGrant() local 71 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/app/src/android/app/cts/ |
D | WallpaperInfoTest.java | 25 import android.content.pm.PackageManager; 26 import android.content.pm.ResolveInfo; 44 PackageManager pm = context.getPackageManager(); in test() local 45 List<ResolveInfo> result = pm.queryIntentServices(intent, PackageManager.GET_META_DATA); in test() 49 assertEquals("Title", wallpaperInfo.loadLabel(pm)); in test() 50 assertEquals("Description", wallpaperInfo.loadDescription(pm)); in test() 51 assertEquals("Collection", wallpaperInfo.loadAuthor(pm)); in test() 52 assertEquals("Context", wallpaperInfo.loadContextDescription(pm)); in test() 53 assertEquals("http://android.com", wallpaperInfo.loadContextUri(pm).toString()); in test() 55 assertNotNull(wallpaperInfo.loadIcon(pm)); in test() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/PackageAccessApp/src/com/android/cts/packageaccessapp/ |
D | PackageAccessTest.java | 24 import android.content.pm.PackageInfo; 25 import android.content.pm.PackageManager; 26 import android.content.pm.PackageManager.NameNotFoundException; 52 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_inUser() local 54 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_inUser() 63 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_inUserUninstalled() local 65 PackageInfo pi = pm.getPackageInfo(TINY_PKG, PackageManager.MATCH_UNINSTALLED_PACKAGES); in testPackageAccess_inUserUninstalled() 74 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_notInOtherUser() local 76 PackageInfo pi = pm.getPackageInfo(TINY_PKG, 0); in testPackageAccess_notInOtherUser() 85 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testPackageAccess_notInOtherUserUninstalled() local [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | PowerManagerTest.java | 37 PowerManager pm = (PowerManager)getContext().getSystemService(Context.POWER_SERVICE); in testPowerManager() local 39 WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, TAG); in testPowerManager() 46 pm.goToSleep(SystemClock.uptimeMillis()); in testPowerManager() 53 pm.wakeUp(SystemClock.uptimeMillis()); in testPowerManager() 60 pm.nap(SystemClock.uptimeMillis()); in testPowerManager() 67 pm.reboot("Testing"); in testPowerManager() 75 pm.userActivity(SystemClock.uptimeMillis(), false); in testPowerManager()
|
/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/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 …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | VerifiedBootTest.java | 19 import android.content.pm.PackageManager; 38 PackageManager pm = getContext().getPackageManager(); in testVerifiedBootSupport() local 39 assertNotNull("PackageManager must not be null", pm); in testVerifiedBootSupport() 40 boolean isRAMNormal = pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL); in testVerifiedBootSupport() 45 pm.hasSystemFeature(PackageManager.FEATURE_VERIFIED_BOOT)); in testVerifiedBootSupport()
|
/cts/hostsidetests/shortcuts/deviceside/backup/publisher2/src/android/content/pm/cts/shortcut/backup/publisher2/ |
D | ShortcutManagerPreBackup2Test.java | 16 package android.content.pm.cts.shortcut.backup.publisher2; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.retryUntil; 23 import android.content.pm.PackageManager; 24 import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
|
D | ShortcutManagerPreBackupTest.java | 16 package android.content.pm.cts.shortcut.backup.publisher2; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makePersistableBun… 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set; 24 import android.content.pm.ShortcutInfo; 25 import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
|
/cts/tools/cts-preconditions/src/com/android/preconditions/cts/ |
D | PreconditionsTest.java | 19 import android.content.pm.PackageManager; 38 PackageManager pm = this.getContext().getPackageManager(); in testScreenUnlocked() local 39 if (pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK) in testScreenUnlocked() 40 || pm.hasSystemFeature(PackageManager.FEATURE_WATCH) in testScreenUnlocked() 41 || pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) { in testScreenUnlocked()
|
/cts/hostsidetests/shortcuts/deviceside/backup/publisher3/src/android/content/pm/cts/shortcut/backup/publisher3/ |
D | ShortcutManagerPreBackupTest.java | 16 package android.content.pm.cts.shortcut.backup.publisher3; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makePersistableBun… 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set; 24 import android.content.pm.ShortcutInfo; 25 import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
|
/cts/hostsidetests/appsecurity/test-apps/keysets/testApp/src/com/android/cts/keysets/ |
D | KeySetPermissionsTest.java | 19 import android.content.pm.PackageInfo; 20 import android.content.pm.PackageManager; 36 PackageManager pm = getContext().getPackageManager(); in testHasPerm() local 38 … pm.checkPermission(KEYSET_PERM_NAME, KEYSET_APP_PKG) == PackageManager.PERMISSION_GRANTED); in testHasPerm()
|
/cts/hostsidetests/shortcuts/deviceside/backup/publisher4old/src/android/content/pm/cts/shortcut/backup/publisher4/ |
D | ShortcutManagerPreBackupTest.java | 16 package android.content.pm.cts.shortcut.backup.publisher4; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makePersistableBun… 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set; 24 import android.content.pm.ShortcutInfo; 25 import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
|
/cts/hostsidetests/shortcuts/deviceside/backup/publisher1/src/android/content/pm/cts/shortcut/backup/publisher1/ |
D | ShortcutManagerPreBackupTest.java | 16 package android.content.pm.cts.shortcut.backup.publisher1; 18 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; 19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; 20 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makePersistableBun… 21 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set; 24 import android.content.pm.ShortcutInfo; 25 import android.content.pm.cts.shortcut.device.common.ShortcutManagerDeviceTestBase;
|
/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 …]
|