Home
last modified time | relevance | path

Searched refs:mPackageManager (Results 1 – 25 of 96) sorted by relevance

1234

/cts/tests/tests/appenumeration/src/android/appenumeration/cts/
DCrossUserPackageVisibilityTests.java89 private PackageManager mPackageManager; field in CrossUserPackageVisibilityTests
96 mPackageManager = mContext.getPackageManager(); in setup()
123 () -> mPackageManager.isPackageSuspended(TARGET_STUB)); in testIsPackageSuspended_cannotDetectStubPkg()
128 () -> mPackageManager.isPackageSuspended(TARGET_STUB)); in testIsPackageSuspended_cannotDetectStubPkg()
134 () -> mPackageManager.getTargetSdkVersion(TARGET_STUB)); in testGetTargetSdkVersion_cannotDetectStubPkg()
139 () -> mPackageManager.getTargetSdkVersion(TARGET_STUB)); in testGetTargetSdkVersion_cannotDetectStubPkg()
145 assertThat(mPackageManager.checkSignatures(selfPackageName, TARGET_STUB)) in testCheckSignatures_cannotDetectStubPkg()
147 assertThat(mPackageManager.checkSignatures(TARGET_STUB, selfPackageName)) in testCheckSignatures_cannotDetectStubPkg()
152 assertThat(mPackageManager.checkSignatures(selfPackageName, TARGET_STUB)) in testCheckSignatures_cannotDetectStubPkg()
154 assertThat(mPackageManager.checkSignatures(TARGET_STUB, selfPackageName)) in testCheckSignatures_cannotDetectStubPkg()
[all …]
/cts/hostsidetests/packagemanager/stats/device/src/com/android/cts/packagemanager/stats/device/
DComponentStateChangedReportedStatsTestsHelper.java47 private PackageManager mPackageManager; field in ComponentStateChangedReportedStatsTestsHelper
51 mPackageManager = in setup()
58 mPackageManager.setApplicationEnabledSetting(TEST_COMPONENT_STATE_APP_PACKAGE_NAME, in testSetApplicationEnabledSetting()
61 mPackageManager.getApplicationEnabledSetting( in testSetApplicationEnabledSetting()
70 mPackageManager.setComponentEnabledSetting(componentName, in testSetComponentEnabledSettingForLauncherActivity()
73 mPackageManager.getComponentEnabledSetting(componentName)); in testSetComponentEnabledSettingForLauncherActivity()
81 mPackageManager.setComponentEnabledSetting(componentName, in testSetComponentEnabledSettingForNoLauncherActivity()
84 mPackageManager.getComponentEnabledSetting(componentName)); in testSetComponentEnabledSettingForNoLauncherActivity()
92 mPackageManager.setComponentEnabledSetting(componentName, in testSetComponentEnabledSettingEnabledThenDisabled()
95 mPackageManager.getComponentEnabledSetting(componentName)); in testSetComponentEnabledSettingEnabledThenDisabled()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DTelephonyFeatureFlagsTest.java37 private PackageManager mPackageManager; field in TelephonyFeatureFlagsTest
42 mPackageManager = getContext().getPackageManager(); in setUp()
43 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)); in setUp()
48 boolean hasFeatureTelecom = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
50 boolean hasFeatureTelephony = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
52 boolean hasFeatureCalling = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
54 boolean hasFeatureCarrierLock = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
56 boolean hasFeatureCdma = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
58 boolean hasFeatureData = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
60 boolean hasFeatureEuicc = mPackageManager.hasSystemFeature( in testFeatureFlagsValidation()
[all …]
DSipProfileTest.java32 private PackageManager mPackageManager; field in SipProfileTest
36 mPackageManager = getContext().getPackageManager(); in setUp()
41 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_SIP) in testSetCallingUid()
42 || !mPackageManager.hasSystemFeature(PackageManager.FEATURE_SIP_VOIP)) { in testSetCallingUid()
DTelephonyCallbackTest.java135 private PackageManager mPackageManager; field in TelephonyCallbackTest
180 mPackageManager = getContext().getPackageManager(); in setUp()
182 mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)); in setUp()
250 assumeTrue(mPackageManager.hasSystemFeature( in testOnServiceStateChangedByRegisterTelephonyCallback()
276 assumeTrue(mPackageManager.hasSystemFeature( in testOnServiceStateChangedByRegisterTelephonyCallbackWithLocationRenounce()
307 assumeTrue(mPackageManager.hasSystemFeature( in testOnServiceStateChangedByRegisterTelephonyCallbackWithCoarseRenounce()
337 assumeTrue(mPackageManager.hasSystemFeature( in testOnServiceStateChangedByRegisterTelephonyCallbackWithFineOnlyRenounce()
385 assumeTrue(mPackageManager.hasSystemFeature( in testOnUnRegisterFollowedByRegisterTelephonyCallback()
458 assumeTrue(mPackageManager.hasSystemFeature( in testOnSignalStrengthsChangedByRegisterTelephonyCallback()
498 assumeTrue(mPackageManager.hasSystemFeature( in testOnMessageWaitingIndicatorChangedByRegisterTelephonyCallback()
[all …]
DPhoneStateListenerTest.java121 private PackageManager mPackageManager; field in PhoneStateListenerTest
151 mPackageManager = getContext().getPackageManager(); in setUp()
153 mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)); in setUp()
184 assumeTrue(mPackageManager.hasSystemFeature( in testOnServiceStateChanged()
214 assumeTrue(mPackageManager.hasSystemFeature( in testOnUnRegisterFollowedByRegister()
267 assumeTrue(mPackageManager.hasSystemFeature( in testOnSignalStrengthChanged()
340 assumeTrue(mPackageManager.hasSystemFeature( in testOnSignalStrengthsChanged()
426 mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_MESSAGING)); in testOnMessageWaitingIndicatorChanged()
457 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CALLING)); in testOnPreciseCallStateChanged()
492 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CALLING)); in testOnCallDisconnectCauseChanged()
[all …]
/cts/libs/helpers/core/tests/src/com/android/cts/helpers/
DDeviceInteractionHelperRuleTest.java38 @Mock private PackageManager mPackageManager; field in DeviceInteractionHelperRuleTest
60 when(mPackageManager.getApplicationInfo( in testMissingProperty()
67 rule.buildPackageList(null, mPackageManager); in testMissingProperty()
78 when(mPackageManager.getApplicationInfo( in testEmptyProperty()
85 rule.buildPackageList("", mPackageManager); in testEmptyProperty()
96 when(mPackageManager.getApplicationInfo( in testExplicitDefaultProperty()
103 rule.buildPackageList("com.android.cts.helpers.aosp", mPackageManager); in testExplicitDefaultProperty()
115 when(mPackageManager.getApplicationInfo( in testOnePackageExplicitDefault()
118 when(mPackageManager.getApplicationInfo("test.b", PackageManager.GET_META_DATA)) in testOnePackageExplicitDefault()
124 rule.buildPackageList("test.b:com.android.cts.helpers.aosp", mPackageManager); in testOnePackageExplicitDefault()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DSettingsIntentsTest.java31 private PackageManager mPackageManager; field in SettingsIntentsTest
40 mPackageManager = getActivity().getPackageManager(); in setUp()
44 assertNotNull(mPackageManager.resolveActivity( in testSettings()
49 assertNotNull(mPackageManager.resolveActivity( in testAccounts()
54 assertNotNull(mPackageManager.resolveActivity( in testApps()
60 assertNotNull(mPackageManager.resolveActivity( in testSecurity()
65 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_NFC)) { in testNfc()
66 assertNotNull(mPackageManager.resolveActivity( in testNfc()
72 assertNotNull(mPackageManager.resolveActivity( in testLocation()
/cts/tests/suspendapps/permission/src/android/suspendapps/permission/cts/
DNegativePermissionsTest.java51 private PackageManager mPackageManager; field in NegativePermissionsTest
56 mPackageManager = context.getPackageManager(); in setUp()
75 () -> mPackageManager.setPackagesSuspended(PACKAGES_TO_SUSPEND, true, null, null, in setPackagesSuspended()
78 () -> mPackageManager.setPackagesSuspended(PACKAGES_TO_SUSPEND, false, null, null, in setPackagesSuspended()
85 () -> mPackageManager.setPackagesSuspended(PACKAGES_TO_SUSPEND, true, null, null, in setPackagesSuspended_deprecated()
88 () -> mPackageManager.setPackagesSuspended(PACKAGES_TO_SUSPEND, false, null, null, in setPackagesSuspended_deprecated()
95 () -> mPackageManager.setDistractingPackageRestrictions(PACKAGES_TO_SUSPEND, in setDistractingPackageRestrictions()
99 () -> mPackageManager.setDistractingPackageRestrictions(PACKAGES_TO_SUSPEND, in setDistractingPackageRestrictions()
103 () -> mPackageManager.setDistractingPackageRestrictions(PACKAGES_TO_SUSPEND, in setDistractingPackageRestrictions()
107 () -> mPackageManager.setDistractingPackageRestrictions(PACKAGES_TO_SUSPEND, in setDistractingPackageRestrictions()
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageManagerTest.java217 private PackageManager mPackageManager; field in PackageManagerTest
365 mPackageManager = mContext.getPackageManager(); in setup()
387 List<ResolveInfo> listWithDiff = mPackageManager.queryIntentActivityOptions( in testQuery()
393 List<ResolveInfo> listInSame = mPackageManager.queryIntentActivityOptions( in testQuery()
400 mPackageManager.queryIntentActivities(activityIntent, in testQuery()
409 List<InstrumentationInfo> instrumentations = mPackageManager.queryInstrumentation( in testQuery()
415 List<ResolveInfo> services = mPackageManager.queryIntentServices(serviceIntent, in testQuery()
422 mPackageManager.queryBroadcastReceivers(broadcastIntent, in testQuery()
428 List<PermissionInfo> permissions = mPackageManager.queryPermissionsByGroup( in testQuery()
432 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, in testQuery()
[all …]
DFeatureTest.java39 private PackageManager mPackageManager; field in FeatureTest
49 mPackageManager = getContext().getPackageManager(); in setUp()
53 mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN); in setUp()
55 mPackageManager.hasSystemFeature(PackageManager.FEATURE_MANAGED_USERS); in setUp()
101 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE) in isHandheldOrTabletDevice()
102 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK) in isHandheldOrTabletDevice()
103 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH) in isHandheldOrTabletDevice()
104 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_EMBEDDED)) { in isHandheldOrTabletDevice()
DSaferIntentTest.java86 private PackageManager mPackageManager; field in SaferIntentTest
150 mPackageManager = mContext.getPackageManager(); in setup()
300 results = mPackageManager.queryIntentActivities(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
303 results = mPackageManager.queryIntentActivities(intent, activityFlags); in testQueryEnforceIntentFilterMatch()
305 results = mPackageManager.queryIntentServices(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
307 results = mPackageManager.queryBroadcastReceivers(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
312 results = mPackageManager.queryIntentActivities(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
314 results = mPackageManager.queryIntentServices(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
316 results = mPackageManager.queryBroadcastReceivers(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
328 results = mPackageManager.queryIntentActivities(intent, emptyFlags); in testQueryEnforceIntentFilterMatch()
[all …]
DPackageItemInfoIconTest.java53 private PackageManager mPackageManager; field in PackageItemInfoIconTest
58 mPackageManager = mContext.getPackageManager(); in before()
69 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, null); in testSystemDefault()
79 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, in testFromAppInfo()
84 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, appInfo); in testFromAppInfo()
97 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, in testFromActivity()
103 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, appInfo); in testFromActivity()
117 Drawable icon = itemInfo.loadUnbadgedIcon(mPackageManager); in testDelegatedSystemDefault()
127 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, in testDelegatedFromAppInfo()
130 Drawable icon = appInfo.loadUnbadgedIcon(mPackageManager); in testDelegatedFromAppInfo()
[all …]
DInstantAppTest.java41 private PackageManager mPackageManager; field in InstantAppTest
46 mPackageManager = getContext().getPackageManager(); in setUp()
57 mPackageManager.queryIntentServices(resolverIntent, in testInstantAppResolverQuery()
72 mPackageManager.queryIntentActivities(intent, in testInstantAppInstallerQuery()
/cts/tests/app/src/android/app/cts/
DSystemFeaturesTest.java73 private PackageManager mPackageManager; field in SystemFeaturesTest
87 mPackageManager = mContext.getPackageManager(); in setUp()
89 if (mPackageManager.getSystemAvailableFeatures() != null) { in setUp()
90 for (FeatureInfo feature : mPackageManager.getSystemAvailableFeatures()) { in setUp()
153 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in testCameraFeatures()
248 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) || in checkFrontCamera()
249 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in checkFrontCamera()
253 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) || in checkFrontCamera()
254 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in checkFrontCamera()
286 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) { in testGamepadFeature()
[all …]
DAttributionTagsTest.java52 private PackageManager mPackageManager; field in AttributionTagsTest
58 mPackageManager = mContext.getPackageManager(); in setUp()
66 mPackageManager.getActivityInfo(intent.getComponent(), 0).attributionTags[0]); in testActivity()
81 mPackageManager.getActivityInfo(intent.getComponent(), 0).attributionTags[0]); in testActivityAlias()
94 mPackageManager.getServiceInfo(intent.getComponent(), 0).attributionTags[0]); in testService()
106 mPackageManager.getProviderInfo(intent.getComponent(), 0).attributionTags[0]); in testProvider()
118 mPackageManager.getReceiverInfo(intent.getComponent(), 0).attributionTags[0]); in testReceiver()
/cts/tests/tests/hardware/src/android/hardware/cts/
DSecurityModelFeatureTest.java46 private PackageManager mPackageManager; field in SecurityModelFeatureTest
55 mPackageManager = InstrumentationRegistry.getTargetContext().getPackageManager(); in setUp()
57 mPackageManager.hasSystemFeature(PackageManager.FEATURE_SECURITY_MODEL_COMPATIBLE); in setUp()
63 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEVISION)); in testTv()
70 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)); in testWatch()
77 assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)); in testAuto()
/cts/tests/tests/telecom/src/android/telecom/cts/
DTelecomAvailabilityTest.java50 private PackageManager mPackageManager; field in TelecomAvailabilityTest
57 mPackageManager = getInstrumentation().getTargetContext().getPackageManager(); in setUp()
68 PackageInfo packageInfo = findOnlyTelecomPackageInfo(mPackageManager); in testTelecomIsPreinstalledAndSystem()
86 mPackageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); in testTelecomHandlesCallIntents()
118 mPackageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); in testTelecomCanManageBlockedNumbers()
140 assertEquals(1, mPackageManager.queryIntentActivities(intentWithoutNumber, in testCreateLaunchEmergencyDialerIntent()
145 assertEquals(1, mPackageManager.queryIntentActivities(intentWithNumber, in testCreateLaunchEmergencyDialerIntent()
172 boolean hasAudioInputAndOutput = mPackageManager.hasSystemFeature( in testTelecomFeatureAvailability()
173 PackageManager.FEATURE_MICROPHONE) && mPackageManager.hasSystemFeature( in testTelecomFeatureAvailability()
182 assertTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELECOM)); in testTelecomFeatureAvailability()
/cts/tests/tests/systemintents/src/android/systemintents/cts/
DTestSystemIntents.java61 private PackageManager mPackageManager; field in TestSystemIntents
94 mPackageManager = mContext.getPackageManager(); in setUp()
101 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) { in testSystemIntents()
105 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testSystemIntents()
109 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_INPUT_METHODS)) { in testSystemIntents()
120 final ResolveInfo ri = mPackageManager.resolveActivity(e.intent, in testSystemIntents()
130 final ResolveInfo resolveInfo = mPackageManager.resolveActivity( in testActionInputMethodSettings_resolvedBy_highPriorityComponent()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20223/src/android/security/cts/CVE_2022_20223/
DDeviceTest.java46 private PackageManager mPackageManager; field in DeviceTest
49 return mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEVISION) in isTV()
50 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK); in isTV()
67 mPackageManager = mContext.getPackageManager(); in testAppRestrictionsFragment()
75 intent.resolveActivity(mPackageManager).getPackageName(); in testAppRestrictionsFragment()
76 Resources res = mPackageManager.getResourcesForApplication(settingsPackageName); in testAppRestrictionsFragment()
101 intent.resolveActivity(mPackageManager).getPackageName(); in testAppRestrictionsFragment()
102 Resources res = mPackageManager.getResourcesForApplication(settingsPackageName); in testAppRestrictionsFragment()
120 Resources res = mPackageManager.getResourcesForApplication(androidPackageName); in testAppRestrictionsFragment()
/cts/tests/appcloning/src/android/appcloning/cts/
DCrossProfileIntentFilterTest.java46 private PackageManager mPackageManager; field in CrossProfileIntentFilterTest
51 mPackageManager = mContext.getPackageManager(); in setUp()
74 mPackageManager in addCrossProfileIntentFilterForSystemAccessTest()
99 mPackageManager in addCrossProfileIntentFilterForAllAccessTest()
109 PackageManager pm = mPackageManager; in isHardwareSupported()
/cts/tests/camera/src/android/hardware/camera2/cts/
DPropertyTest.java67 private PackageManager mPackageManager; field in PropertyTest
110 mPackageManager = mContext.getPackageManager(); in setup()
122 CameraManager.getRotationOverrideInternal(mContext, mPackageManager, in testLandscapeToPortraitEnabled()
129 CameraManager.shouldOverrideToPortrait(mPackageManager, in testLandscapeToPortraitEnabled()
145 CameraManager.getRotationOverrideInternal(mContext, mPackageManager, in testLandscapeToPortraitDisabled()
151 CameraManager.shouldOverrideToPortrait(mPackageManager, in testLandscapeToPortraitDisabled()
/cts/tests/tests/telephony2/src/android/telephony2/cts/
DTelephonyManagerNoPermissionTest.java41 private PackageManager mPackageManager; field in TelephonyManagerNoPermissionTest
48 mPackageManager = mContext.getPackageManager(); in setUp()
60 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testGetCallState_redirectToTelecom()
78 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testGetCallStateForSubscription()
/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/embedding/
DActivityEmbeddingPropertyTests.java45 private PackageManager mPackageManager; field in ActivityEmbeddingPropertyTests
53 mPackageManager = mTestActivity.getPackageManager(); in setUp()
66 final PackageManager.Property property = mPackageManager.getProperty(propertyName, in getProperty()
/cts/tests/tests/telephony5/src/android/telephony5/cts/
DTelephonyManagerReadNonDangerousPermissionTest.java46 private PackageManager mPackageManager; field in TelephonyManagerReadNonDangerousPermissionTest
55 mPackageManager = mContext.getPackageManager(); in setUp()
68 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testReadNonDangerousPermission()
85 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in testPremiumCapabilities()
86 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)) { in testPremiumCapabilities()

1234