Home
last modified time | relevance | path

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

123

/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/tests/tests/content/src/android/content/pm/cts/
DPackageManagerTest.java86 private PackageManager mPackageManager; field in PackageManagerTest
113 mPackageManager = InstrumentationRegistry.getContext().getPackageManager(); in setup()
123 List<ResolveInfo> listWithDiff = mPackageManager.queryIntentActivityOptions( in testQuery()
128 List<ResolveInfo> listInSame = mPackageManager.queryIntentActivityOptions( in testQuery()
134 mPackageManager.queryIntentActivities(activityIntent, 0); in testQuery()
142 List<InstrumentationInfo> instrumentations = mPackageManager.queryInstrumentation( in testQuery()
148 List<ResolveInfo> services = mPackageManager.queryIntentServices(serviceIntent, in testQuery()
156 broadcastReceivers = mPackageManager.queryBroadcastReceivers(broadcastIntent, 0); in testQuery()
161 List<PermissionInfo> permissions = mPackageManager.queryPermissionsByGroup( in testQuery()
165 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, 0); in testQuery()
[all …]
DPackageItemInfoIconTest.java52 private PackageManager mPackageManager; field in PackageItemInfoIconTest
57 mPackageManager = mContext.getPackageManager(); in before()
68 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, null); in testSystemDefault()
78 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, 0); in testFromAppInfo()
82 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, appInfo); in testFromAppInfo()
92 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, 0); in testFromActivity()
97 Drawable icon = mPackageManager.loadUnbadgedItemIcon(itemInfo, appInfo); in testFromActivity()
110 Drawable icon = itemInfo.loadUnbadgedIcon(mPackageManager); in testDelegatedSystemDefault()
120 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, 0); in testDelegatedFromAppInfo()
122 Drawable icon = appInfo.loadUnbadgedIcon(mPackageManager); in testDelegatedFromAppInfo()
[all …]
DPackageItemInfoTest.java38 private PackageManager mPackageManager; field in PackageItemInfoTest
43 mPackageManager = getContext().getPackageManager(); in setUp()
53 assertEquals(ACTIVITY_NAME, pkgItemInfo.loadLabel(mPackageManager)); in testLoadMethods()
55 assertNotNull(pkgItemInfo.loadIcon(mPackageManager)); in testLoadMethods()
58 XmlResourceParser parser = pkgItemInfo.loadXmlMetaData(mPackageManager, METADATA_NAME); in testLoadMethods()
99 mPackageManager.getActivityInfo(componentName, PackageManager.GET_META_DATA); in getTestItemInfo()
DFeatureTest.java42 private PackageManager mPackageManager; field in FeatureTest
51 mPackageManager = getContext().getPackageManager(); in setUp()
55 mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN); in setUp()
57 mPackageManager.hasSystemFeature(PackageManager.FEATURE_MANAGED_USERS); in setUp()
61 if (mPackageManager == null || mActivityManager == null) { in testNoManagedUsersIfLowRamDevice()
DInstantAppTest.java44 private PackageManager mPackageManager; field in InstantAppTest
49 mPackageManager = getContext().getPackageManager(); in setUp()
60 mPackageManager.queryIntentServices(resolverIntent, resolveFlags); in testInstantAppResolverQuery()
74 mPackageManager.queryIntentActivities(intent, resolveFlags); in testInstantAppInstallerQuery()
/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()
DManagedProfileTest.java38 private PackageManager mPackageManager; field in ManagedProfileTest
52 mPackageManager = getActivity().getPackageManager(); in setUp()
68 assertEquals(1, mPackageManager.queryIntentActivities( in testClearCrossProfileIntentFilters()
73 assertTrue(mPackageManager.queryIntentActivities( in testClearCrossProfileIntentFilters()
80 assertEquals(0, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_primary()
88 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_primary()
95 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_all()
103 assertEquals(2, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_all()
110 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_managed()
119 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_managed()
DPrimaryUserTest.java39 private PackageManager mPackageManager; field in PrimaryUserTest
52 mPackageManager = getActivity().getPackageManager(); in setUp()
56 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_primary()
63 assertEquals(2, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_all()
71 assertEquals(1, mPackageManager.queryIntentActivities( in testAddCrossProfileIntentFilter_managed()
/cts/tests/app/src/android/app/cts/
DSystemFeaturesTest.java75 private PackageManager mPackageManager; field in SystemFeaturesTest
89 mPackageManager = mContext.getPackageManager(); in setUp()
91 if (mPackageManager.getSystemAvailableFeatures() != null) { in setUp()
92 for (FeatureInfo feature : mPackageManager.getSystemAvailableFeatures()) { in setUp()
155 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in testCameraFeatures()
243 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) || in checkFrontCamera()
244 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in checkFrontCamera()
248 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) || in checkFrontCamera()
249 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in checkFrontCamera()
286 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) { in testGamepadFeature()
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DPackageManagerRequiringPermissionsTest.java34 private PackageManager mPackageManager; field in PackageManagerRequiringPermissionsTest
39 mPackageManager = getContext().getPackageManager(); in setUp()
40 assertNotNull(mPackageManager); in setUp()
50 mPackageManager.setApplicationEnabledSetting(PACKAGE_NAME, in testSetApplicationEnabledSetting()
69 mPackageManager.addPreferredActivity(filter, 0, null, null); in testAddPreferredActivity()
86 mPackageManager.clearPackagePreferredActivities(null); in testClearPackagePreferredActivities()
101 mPackageManager.verifyPendingInstall(1, 1); in testVerifyPendingInstall()
116 mPackageManager.extendVerificationTimeout(1, 1, 10000); in testExtendVerificationTimeout()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DTelephonyManagerTest.java116 private PackageManager mPackageManager; field in TelephonyManagerTest
231 mPackageManager = getContext().getPackageManager(); in setUp()
260 PackageInfo pInfo = mPackageManager.getPackageInfo(pkgName, in getCertHash()
276 return mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in hasCellular()
676 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testGetRadioHalVersion()
690 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testCreateForPhoneAccountHandle()
758 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testGetMaxNumberOfSimultaneouslyActiveSims()
787 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in verifyDeviceId()
794 } else if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) { in verifyDeviceId()
797 } else if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) { in verifyDeviceId()
[all …]
DSmsMessageTest.java40 private PackageManager mPackageManager; field in SmsMessageTest
88 mPackageManager = getContext().getPackageManager(); in setUp()
93 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in testCreateFromPdu()
94 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CDMA)) { in testCreateFromPdu()
177 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in testCPHSVoiceMail()
178 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CDMA)) { in testCPHSVoiceMail()
221 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in testGetUserData()
222 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CDMA)) { in testGetUserData()
241 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testGetSubmitPdu()
282 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) in testEmailGateway()
[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()
DIwlanModeTest.java34 private PackageManager mPackageManager; field in IwlanModeTest
41 mPackageManager = mContext.getPackageManager(); in setUp()
47 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testIwlanMode()
/cts/tests/tests/net/api23Test/src/android/net/cts/api23test/
DConnectivityManagerApi23Test.java45 private PackageManager mPackageManager; field in ConnectivityManagerApi23Test
53 mPackageManager = mContext.getPackageManager(); in setUp()
61 if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) { in testConnectivityChanged_manifestRequestOnly_shouldNotReceiveIntent()
79 if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) { in testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent()
98 if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) { in testConnectivityChanged_whenRegistered_shouldReceiveIntent()
/cts/tests/tests/telecom/src/android/telecom/cts/
DTelecomAvailabilityTest.java44 private PackageManager mPackageManager; field in TelecomAvailabilityTest
51 mPackageManager = getInstrumentation().getTargetContext().getPackageManager(); in setUp()
62 PackageInfo packageInfo = findOnlyTelecomPackageInfo(mPackageManager); in testTelecomIsPreinstalledAndSystem()
80 mPackageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); in testTelecomHandlesCallIntents()
112 mPackageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); in testTelecomCanManageBlockedNumbers()
DDefaultDialerOperationsTest.java52 private PackageManager mPackageManager; field in DefaultDialerOperationsTest
74 mPackageManager = mContext.getPackageManager(); in setUp()
110 mPackageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); in testActionDialHandling()
122 mPackageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); in testDialerUI()
136 mPackageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); in testEmergencyDialerUI()
262 mPackageManager.setComponentEnabledSetting( in donotTestSetDefaultDialerNoDialIntent_notSupported()
272 mPackageManager.setComponentEnabledSetting( in donotTestSetDefaultDialerNoDialIntent_notSupported()
/cts/tests/tests/location/src/android/location/cts/
DScanningSettingsTest.java60 private PackageManager mPackageManager; field in ScanningSettingsTest
67 mPackageManager = mContext.getPackageManager(); in setUp()
74 mLauncherPackage = mPackageManager.resolveActivity(launcherIntent, in setUp()
98 return mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEVISION) in isTv()
99 && mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK); in isTv()
143 final Resources res = mPackageManager.getResourcesForApplication(SETTINGS_PACKAGE); in toggleSettingAndVerify()
/cts/tests/admin/src/android/admin/cts/
DDeviceAdminInfoTest.java33 private PackageManager mPackageManager; field in DeviceAdminInfoTest
42 mPackageManager = mContext.getPackageManager(); in setUp()
82 resolveInfo.activityInfo = mPackageManager.getReceiverInfo(mComponent, in testDeviceAdminInfo()
115 resolveInfo.activityInfo = mPackageManager.getReceiverInfo(mSecondComponent, in testDeviceAdminInfo2()
148 resolveInfo.activityInfo = mPackageManager.getReceiverInfo(mThirdComponent, in testDeviceAdminInfo3()
212 return mPackageManager.getReceiverInfo(componentName, PackageManager.GET_META_DATA); in buildActivityInfo()
/cts/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/
DBasePackageInstallTest.java58 protected PackageManager mPackageManager; field in BasePackageInstallTest
95 mPackageManager = mContext.getPackageManager(); in setUp()
96 mPackageInstaller = mPackageManager.getPackageInstaller(); in setUp()
99 mHasFeature = mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN); in setUp()
205 PackageInfo pi = mPackageManager.getPackageInfo(packageName, 0); in isPackageInstalled()
213 return mPackageManager.getInstallReason(packageName, Process.myUserHandle()); in getInstallReason()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAudioRestrictionTest.java37 private PackageManager mPackageManager; field in AudioRestrictionTest
51 mPackageManager = mContext.getPackageManager(); in setUp()
59 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUDIO_OUTPUT)) { in testDisallowAdjustVolume_muted()
92 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUDIO_OUTPUT) in testDisallowAdjustVolume()
144 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_MICROPHONE)) { in testDisallowUnmuteMicrophone()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodFlowTestHelper.java10 private PackageManager mPackageManager; field in ByodFlowTestHelper
14 this.mPackageManager = mContext.getPackageManager(); in ByodFlowTestHelper()
68 mPackageManager.setComponentEnabledSetting(new ComponentName(mContext, component), in setComponentsEnabledState()
/cts/tests/camera/src/android/hardware/camera2/cts/
DCameraManagerTest.java69 private PackageManager mPackageManager; field in CameraManagerTest
82 mPackageManager = context.getPackageManager(); in setContext()
83 assertNotNull("Can't get package manager", mPackageManager); in setContext()
152 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)); in testCameraManagerGetDeviceIdList()
166 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT)); in testCameraManagerGetDeviceIdList()
169 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)); in testCameraManagerGetDeviceIdList()
173 mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)); in testCameraManagerGetDeviceIdList()
180 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL)) { in testCameraManagerGetDeviceIdList()
191 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)); in testCameraManagerGetDeviceIdList()
194 || mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA) in testCameraManagerGetDeviceIdList()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DPackageInstallTest.java29 private PackageManager mPackageManager; field in PackageInstallTest
37 mPackageManager = mContext.getPackageManager(); in setUp()
38 mPackageInstaller = mPackageManager.getPackageInstaller(); in setUp()
135 return mPackageManager.getPackageInfo(packageName, 0) != null; in isPackageInstalled()

123