Home
last modified time | relevance | path

Searched refs:pm (Results 1 – 25 of 1175) sorted by relevance

12345678910>>...47

/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/
DCookieTest.java24 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/
DApplicationVisibilityCrossUserTest.java18 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/
DV3RotationTest.java21 import android.content.pm.PackageInfo;
22 import android.content.pm.PackageManager;
23 import android.content.pm.Signature;
167 PackageManager pm = getContext().getPackageManager(); in testHasPerm() local
169 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm()
174 PackageManager pm = getContext().getPackageManager(); in testHasNoPerm() local
176 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm()
184 PackageManager pm = getContext().getPackageManager(); in testGetSignaturesShowsOld() local
185 PackageInfo pi = pm.getPackageInfo(PKG, PackageManager.GET_SIGNATURES); in testGetSignaturesShowsOld()
196 PackageManager pm = getContext().getPackageManager(); in testGetSigningCertificatesShowsAll() local
[all …]
/cts/hostsidetests/appsecurity/test-apps/PackageAccessApp/src/com/android/cts/packageaccessapp/
DPackageAccessTest.java22 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/
DPackageItemInfo_DisplayNameComparatorTest.java17 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()
DApplicationInfo_DisplayNameComparatorTest.java17 package android.content.pm.cts;
19 import android.content.pm.ApplicationInfo;
20 import android.content.pm.ApplicationInfo.DisplayNameComparator;
21 import android.content.pm.PackageManager;
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()
DPermissionGroupInfoTest.java17 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()
DPermissionFeatureTest.java17 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()
DResolveInfoTest.java17 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()
DPermissionInfoTest.java17 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()
DProviderInfoListTest.java17 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()
DConfigurationInfoTest.java17 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/PhotoPicker/src/android/photopicker/cts/
DPhotoPickerBaseTest.java23 import android.content.pm.PackageManager;
72 PackageManager pm = inst.getContext().getPackageManager(); in isHardwareSupported() local
73 return !pm.hasSystemFeature(pm.FEATURE_EMBEDDED) in isHardwareSupported()
74 && !pm.hasSystemFeature(pm.FEATURE_WATCH) in isHardwareSupported()
75 && !pm.hasSystemFeature(pm.FEATURE_LEANBACK) in isHardwareSupported()
76 && !pm.hasSystemFeature(pm.FEATURE_AUTOMOTIVE); in isHardwareSupported()
/cts/tests/tests/wifi/src/android/net/wifi/cts/
DWifiFeature.java20 import android.content.pm.PackageManager;
34 final PackageManager pm = context.getPackageManager(); in isTelephonySupported() local
35 return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY); in isTelephonySupported()
39 final PackageManager pm = context.getPackageManager(); in isRttSupported() local
40 return pm.hasSystemFeature(PackageManager.FEATURE_WIFI_RTT); in isRttSupported()
44 final PackageManager pm = context.getPackageManager(); in isAwareSupported() local
45 return pm.hasSystemFeature(PackageManager.FEATURE_WIFI_AWARE); in isAwareSupported()
/cts/tests/app/src/android/app/cts/
DWallpaperInfoTest.java30 import android.content.pm.PackageManager;
31 import android.content.pm.ResolveInfo;
50 PackageManager pm = context.getPackageManager(); in test_wallpaperServiceQuery() local
52 List<ResolveInfo> result = pm.queryIntentServices(intent, PackageManager.GET_META_DATA); in test_wallpaperServiceQuery()
60 PackageManager pm = context.getPackageManager(); in test_wallpaperInfoOptions() local
64 assertEquals(context.getString(R.string.wallpaper_title), wallpaperInfo.loadLabel(pm)); in test_wallpaperInfoOptions()
66 wallpaperInfo.loadDescription(pm)); in test_wallpaperInfoOptions()
68 wallpaperInfo.loadAuthor(pm)); in test_wallpaperInfoOptions()
70 wallpaperInfo.loadContextDescription(pm)); in test_wallpaperInfoOptions()
72 wallpaperInfo.loadContextUri(pm).toString()); in test_wallpaperInfoOptions()
[all …]
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/
DTextClassifierPolicyTest.java5 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/apps/CtsVerifier/src/com/android/cts/verifier/features/
DFeatureUtil.java20 import android.content.pm.PackageManager;
100 PackageManager pm = context.getPackageManager(); in isWatch() local
101 return pm.hasSystemFeature(PackageManager.FEATURE_WATCH); in isWatch()
108 PackageManager pm = context.getPackageManager(); in isWatchOrAutomotive() local
109 return pm.hasSystemFeature(PackageManager.FEATURE_WATCH) in isWatchOrAutomotive()
110 || pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); in isWatchOrAutomotive()
117 PackageManager pm = context.getPackageManager(); in isAutomotive() local
118 return pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); in isAutomotive()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/mainline/
DModuleDetector.java18 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/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerSpoofingTest.java16 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/permission/src/android/permission/cts/
DAppIdleStatePermissionTest.java20 import android.content.pm.PackageInfo;
21 import android.content.pm.PackageManager;
47 final PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testChangeAppIdleStatePermission() local
48 final List<PackageInfo> holding = pm.getPackagesHoldingPermissions(new String[]{ in testChangeAppIdleStatePermission()
55 int uid = pm.getApplicationInfo(pkg.packageName, 0).uid; in testChangeAppIdleStatePermission()
73 final PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testChangeAppLaunchEstimatePermission() local
74 final List<PackageInfo> holding = pm.getPackagesHoldingPermissions(new String[]{ in testChangeAppLaunchEstimatePermission()
81 int uid = pm.getApplicationInfo(pkg.packageName, 0).uid; in testChangeAppLaunchEstimatePermission()
/cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/src/com/android/cts/privilegedupdate/
DPrivilegedAppDisableTest.java23 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/security/src/android/security/cts/
DVerifiedBootTest.java24 import android.content.pm.PackageManager;
56 private static boolean isLowRamExempt(PackageManager pm) { in isLowRamExempt() argument
57 if (pm.hasSystemFeature(PackageManager.FEATURE_RAM_NORMAL)) { in isLowRamExempt()
77 PackageManager pm = mContext.getPackageManager(); in testVerifiedBootSupport() local
78 assertNotNull("PackageManager must not be null", pm); in testVerifiedBootSupport()
79 if (isLowRamExempt(pm)) { in testVerifiedBootSupport()
83 pm.hasSystemFeature(PackageManager.FEATURE_VERIFIED_BOOT)); in testVerifiedBootSupport()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0921/src/android/security/cts/CVE_2021_0921/
DTrigger.java7 import android.content.pm.ApplicationInfo;
8 import android.content.pm.PackageManager;
23 PackageManager pm = context.getPackageManager(); in isCar() local
24 return pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); in isCar()
28 PackageManager pm = context.getPackageManager(); in isWear() local
29 return pm.hasSystemFeature(PackageManager.FEATURE_WATCH); in isWear()
33 PackageManager pm = context.getPackageManager(); in isTv() local
34 return pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION); in isTv()
/cts/tests/tests/settings/src/android/settings/cts/
DWifiSliceTest.java19 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/hostsidetests/shortcuts/deviceside/backup/publisher2/src/android/content/pm/cts/shortcut/backup/publisher2/
DShortcutManagerPreBackup2Test.java16 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;

12345678910>>...47