Home
last modified time | relevance | path

Searched refs:packageManager (Results 1 – 25 of 191) sorted by relevance

12345678

/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java66 PackageManager packageManager = mContext.getPackageManager(); in assertCanBeHandled() local
67 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertCanBeHandled()
78 PackageManager packageManager = mContext.getPackageManager(); in assertDefaultHandlerValidPriority() local
79 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertDefaultHandlerValidPriority()
91 PackageManager packageManager = mContext.getPackageManager(); in assertHandledBySystemOnly() local
92 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertHandledBySystemOnly()
105 PackageManager packageManager = mContext.getPackageManager(); in assertHandledBySelfOnly() local
106 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in assertHandledBySelfOnly()
173 PackageManager packageManager = mContext.getPackageManager(); in testCallPhoneNumber() local
174 if (packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { in testCallPhoneNumber()
[all …]
/cts/tests/PhotoPicker/src/android/photopicker/cts/util/
DPhotoPickerComponentUtils.java54 final PackageManager packageManager = inst.getContext().getPackageManager(); in enableAndGetOldState() local
55 if (isComponentEnabledSetAsExpected(packageManager, in enableAndGetOldState()
61 final int currentState = packageManager.getComponentEnabledSetting(componentName); in enableAndGetOldState()
63 updateComponentEnabledSetting(packageManager, in enableAndGetOldState()
81 @NonNull PackageManager packageManager, in updateComponentEnabledSetting()
88 packageManager.setComponentEnabledSetting(componentName, state, in updateComponentEnabledSetting()
93 waitForComponentToBeInExpectedState(packageManager, componentName, state); in updateComponentEnabledSetting()
97 @NonNull PackageManager packageManager, in waitForComponentToBeInExpectedState()
101 isComponentEnabledSetAsExpected(packageManager, componentName, state), in waitForComponentToBeInExpectedState()
116 private static boolean isComponentEnabledSetAsExpected(@NonNull PackageManager packageManager, in isComponentEnabledSetAsExpected() argument
[all …]
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DModifyInstallerCrossPackageTest.kt62 private val packageManager = context.packageManager constant
81 SHELL_PACKAGE_NAME, packageManager) in assertBefore()
87 SHELL_PACKAGE_NAME, packageManager) in attemptTakeOver()
88 assertThrows { packageManager.setInstallerPackageName(OTHER_PACKAGE, MY_PACKAGE) } in attemptTakeOver()
90 SHELL_PACKAGE_NAME, packageManager) in attemptTakeOver()
96 SHELL_PACKAGE_NAME, packageManager) in assertAfter()
/cts/hostsidetests/appsecurity/test-apps/KeyRotationTest/src/android/appsecurity/cts/keyrotationtest/service/
DSignatureQueryService.java66 private final PackageManager packageManager; field in SignatureQueryService.SignatureQueryServiceImpl
73 SignatureQueryServiceImpl(PackageManager packageManager, String packageName) { in SignatureQueryServiceImpl() argument
74 this.packageManager = packageManager; in SignatureQueryServiceImpl()
200 packageInfo = packageManager.getPackageInfo(packageName, in verifyGetSignatures()
256 packageManager.getPackageInfo(packageName, in verifyGetSigningCertificates()
307 ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0); in verifyHasSigningCertificate()
314 if (!packageManager.hasSigningCertificate( in verifyHasSigningCertificate()
318 if (!packageManager.hasSigningCertificate( in verifyHasSigningCertificate()
357 ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0); in verifyCheckSignatures()
364 packageManager.getApplicationInfo(companionPackageName, 0); in verifyCheckSignatures()
[all …]
/cts/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/src/com/android/cts/packageinstallerpermissionwhitelistapp/
DPermissionWhitelistTest.kt42 private val packageManager = context.packageManager constant
59 packageManager.setInstallerPackageName(TARGET_PKG, packageName) in setTargetInstallerPackage()
70 ShellIdentityUtils.invokeMethodWithShellPermissionsNoReturn(packageManager, in setTargetInstallerPackage()
80 packageManager.removeWhitelistedRestrictedPermission(TARGET_PKG, permission, in removeWhitelistRestrictedPermission()
92 assertThat(packageManager.checkPermission(permission, TARGET_PKG)) in removeWhitelistRestrictedPermission()
97 assertThat(packageManager.getInstallerPackageName(TARGET_PKG)) in assertTargetInstaller()
/cts/tests/tests/wifi/src/android/net/wifi/cts/
DWifiFeature.java24 PackageManager packageManager = context.getPackageManager(); in isWifiSupported() local
25 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI); in isWifiSupported()
29 PackageManager packageManager = context.getPackageManager(); in isP2pSupported() local
30 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT); in isP2pSupported()
/cts/tests/tests/wifi/src/android/net/wifi/nl80211/cts/
DWifiFeature.java24 PackageManager packageManager = context.getPackageManager(); in isWifiSupported() local
25 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI); in isWifiSupported()
29 PackageManager packageManager = context.getPackageManager(); in isP2pSupported() local
30 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT); in isP2pSupported()
/cts/tests/tests/security/src/android/security/cts/
DDynamicPermissionsTest.kt47 private val packageManager = context.packageManager constant
74 packageManager.addPermission(permissionInfo) in testRemovePermission_dynamicPermission_permissionRemoved()
76 .that(packageManager.getPermissionInfo(DYNAMIC_PERMISSION, 0).name) in testRemovePermission_dynamicPermission_permissionRemoved()
79 packageManager.removePermission(DYNAMIC_PERMISSION) in testRemovePermission_dynamicPermission_permissionRemoved()
85 packageManager.getPermissionInfo(DYNAMIC_PERMISSION, 0) in testRemovePermission_dynamicPermission_permissionRemoved()
93 .that(packageManager.getPermissionInfo(NON_DYNAMIC_PERMISSION, 0).name) in testPermissionPermission_nonDynamicPermission_permissionUnchanged()
106 .that(packageManager.getPermissionInfo(NON_DYNAMIC_PERMISSION, 0).name) in testPermissionPermission_nonDynamicPermission_permissionUnchanged()
DCVE_2024_0046.java51 final PackageManager packageManager = getApplicationContext().getPackageManager(); in testPocCVE_2024_0046() local
57 packageManager.resolveActivityAsUser( in testPocCVE_2024_0046()
67 (packageManager.getApplicationInfo(mSettingsPackageName, 0) in testPocCVE_2024_0046()
73 assume().that(packageManager.isInstantApp(mSettingsPackageName)).isFalse(); in testPocCVE_2024_0046()
82 return packageManager.isInstantApp( in testPocCVE_2024_0046()
DPermissionMemoryFootprintTest.kt43 val packageManager: PackageManager = InstrumentationRegistry.getInstrumentation() constant in android.security.cts.PermissionMemoryFootprintTest
44 .getTargetContext().packageManager!!
63 packageManager.addPermission(permInfo) in createOrRemovePermissions()
65 packageManager.removePermission(permInfo.name) in createOrRemovePermissions()
DRolePermissionOverrideTest.kt44 private val packageManager = context.packageManager constant
65 packageManager, MainlineModule.PERMISSION_CONTROLLER_APEX in systemRoleDoesNotOverrideUserRevokedPermission()
80 packageManager.updatePermissionFlags( in systemRoleDoesNotOverrideUserRevokedPermission()
132 assertThat(packageManager.checkPermission(permissionName, packageName)).isEqualTo( in assertPermissionState()
DCVE_2023_20959.java49 PackageManager packageManager = instrumentation.getTargetContext().getPackageManager(); in testPocCVE_2023_20959() local
54 packageManager.resolveActivityAsUser(new Intent(Settings.ACTION_SETTINGS), in testPocCVE_2023_20959()
62 .resolveActivityInfo(packageManager, PackageManager.MATCH_SYSTEM_ONLY)); in testPocCVE_2023_20959()
/cts/hostsidetests/appsecurity/test-apps/PackageInstallerPermissionRequestApp/src/com/android/cts/packageinstallerpermissionrequestapp/
DPermissionRequestTest.kt43 private val packageManager = context.packageManager constant
52 assertThat(packageManager.getInstallerPackageName(packageName)) in verifyPermissionsDeniedAndInstallerUnchanged()
65 packageManager.setInstallerPackageName(packageName, packageName) in setSelfAsInstallerAndWhitelistPermission()
70 packageManager.addWhitelistedRestrictedPermission(packageName, in setSelfAsInstallerAndWhitelistPermission()
/cts/tests/tests/telephony/current/src/android/telephony/euicc/cts/
DEuiccUtil.java37 PackageManager packageManager = context.getPackageManager(); in hasEuiccFeature()
38 return packageManager == null ? false : in hasEuiccFeature()
39 packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_EUICC); in hasEuiccFeature()
/cts/tests/tests/telephony/current/src/android/telephony/embms/cts/
DMbmsUtil.java37 PackageManager packageManager = context.getPackageManager(); in hasMbmsFeature()
38 return packageManager == null ? false : in hasMbmsFeature()
39 packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_MBMS); in hasMbmsFeature()
/cts/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/src/com/android/cts/permissiondeclareapp/
DModifyInstallerCrossPackageTest.kt54 private val packageManager = context.packageManager constant in com.android.cts.permissiondeclareapp.ModifyInstallerCrossPackageTest
72 packageManager.setInstallerPackageName(context.packageName, context.packageName) in takeInstaller()
77 packageManager.setInstallerPackageName(context.packageName, null) in clearInstaller()
/cts/tests/tests/attributionsource/src/android/attributionsource/cts/
DPermissionCheckerTest.kt35 private val packageManager = context.packageManager constant
40 private val helperUid = packageManager.getPackageUid(HELPER_PACKAGE_NAME, 0)
50 packageManager.grantRuntimePermission( in resetHelperPermissionState()
77 packageManager.revokeRuntimePermission( in testCheckPermissionForPreflight()
105 packageManager.revokeRuntimePermission( in testCheckPermissionForDataDelivery()
139 packageManager.revokeRuntimePermission( in testCheckPermissionForDataDeliveryFromDataSource()
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DContactsContractIntentsTest.java62 PackageManager packageManager = getContext().getPackageManager(); in testSetDefaultAccount() local
64 packageManager.hasSystemFeature(PackageManager.FEATURE_WATCH) in testSetDefaultAccount()
65 || packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE) in testSetDefaultAccount()
71 List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); in testSetDefaultAccount()
76 if (packageManager.checkPermission( in testSetDefaultAccount()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DVersion.java42 PackageManager packageManager = context.getPackageManager(); in getPackageInfo() local
43 return packageManager.getPackageInfo(context.getPackageName(), 0); in getPackageInfo()
52 PackageManager packageManager = context.getPackageManager(); in getMetadata() local
53 ApplicationInfo applicationInfo = packageManager.getApplicationInfo( in getMetadata()
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/
DDomainVerificationIntentTestBase.kt60 protected val packageManager = context.packageManager in parameters() constant
73 .let { context.packageManager.queryIntentActivities(it, 0) } in parameters()
80 packageManager.getPackageInfo(DECLARING_PKG_NAME_1, 0) in parameters()
85 packageManager.getPackageInfo(DECLARING_PKG_NAME_2, 0) in parameters()
125 .that(packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY) in assertResolvesTo()
133 .that(packageManager.queryIntentActivities(intent, 0) in assertResolvesTo()
140 packageManager.getApplicationEnabledSetting( in assertResolvesTo()
143 ) && isComponentEnabled(packageManager.getComponentEnabledSetting(it))) in assertResolvesTo()
148 .that(packageManager.queryIntentActivities(intent, 0) in assertResolvesTo()
/cts/tests/tests/os/src/android/os/cts/
DRequiredComponentsTest.java75 PackageManager packageManager = InstrumentationRegistry.getContext().getPackageManager(); in testExtServicesPresent() local
77 packageManager.getServicesSystemSharedLibraryPackageName(); in testExtServicesPresent()
79 PackageInfo packageInfo = packageManager.getPackageInfo(servicesExtensionPackage, 0); in testExtServicesPresent()
123 PackageManager packageManager = InstrumentationRegistry.getContext() in enforceSharedLibPresentAndProperlyHosted() local
127 String[] libs = packageManager.getSystemSharedLibraryNames(); in enforceSharedLibPresentAndProperlyHosted()
140 String packageName = packageManager.getServicesSystemSharedLibraryPackageName(); in enforceSharedLibPresentAndProperlyHosted()
141 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0); in enforceSharedLibPresentAndProperlyHosted()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0706/src/android/security/cts/CVE_2021_0706/
DDeviceTest.java46 PackageManager packageManager = context.getPackageManager(); in testDisablePlugin() local
47 assumeNotNull(packageManager); in testDisablePlugin()
48 Intent intent = packageManager.getLaunchIntentForPackage(TEST_PACKAGE); in testDisablePlugin()
58 intent = packageManager.getLaunchIntentForPackage(TEST_PACKAGE); in testDisablePlugin()
/cts/hostsidetests/packagemanager/multiuser/app/src/com/android/tests/packagemanager/multiuser/app/
DPackageManagerMultiUserTest.java55 PackageManager packageManager = context.getPackageManager(); in testUninstallExistingPackage() local
56 PackageInstaller packageInstaller = packageManager.getPackageInstaller(); in testUninstallExistingPackage()
69 PackageManager packageManager = context.getPackageManager(); in testGetInstalledModules() local
70 List<ModuleInfo> modules = packageManager.getInstalledModules(0); in testGetInstalledModules()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0693/src/android/security/cts/CVE_2021_0693/
DDeviceTest.java56 PackageManager packageManager = context.getPackageManager(); in testHeapDumpAccessibility() local
57 assertNotNull(packageManager); in testHeapDumpAccessibility()
58 final Intent intent = packageManager.getLaunchIntentForPackage(TEST_PACKAGE); in testHeapDumpAccessibility()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DWifiSetHttpProxyTest.java40 PackageManager packageManager = mContext.getPackageManager(); in testSetHttpProxy() local
41 if (!packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) { in testSetHttpProxy()

12345678