Home
last modified time | relevance | path

Searched refs:PackageManager (Results 1 – 25 of 971) sorted by relevance

12345678910>>...39

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java21 import android.content.pm.PackageManager;
64 @Mock private PackageManager mPackageManager;
114 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_MissingApp()
115 | PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_MissingApp()
116 | PackageManager.MATCH_SYSTEM_ONLY)).thenReturn(null); in testDisableCarrierAppsUntilPrivileged_MissingApp()
123 Mockito.eq(PackageManager.SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_HIDDEN)); in testDisableCarrierAppsUntilPrivileged_MissingApp()
125 Mockito.eq(PackageManager.SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_VISIBLE)); in testDisableCarrierAppsUntilPrivileged_MissingApp()
127 Mockito.eq(PackageManager.SYSTEM_APP_STATE_INSTALLED)); in testDisableCarrierAppsUntilPrivileged_MissingApp()
129 Mockito.eq(PackageManager.SYSTEM_APP_STATE_UNINSTALLED)); in testDisableCarrierAppsUntilPrivileged_MissingApp()
138 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
[all …]
/frameworks/base/apct-tests/perftests/packagemanager/src/android/os/
DPackageManagerPerfTest.java26 import android.content.pm.PackageManager;
57 public PackageManagerPerfTest() throws PackageManager.NameNotFoundException { in PackageManagerPerfTest()
63 PackageManager.disableApplicationInfoCache(); in setup()
64 PackageManager.disablePackageInfoCache(); in setup()
68 @DisableCompatChanges(PackageManager.FILTER_APPLICATION_QUERY)
71 final PackageManager pm = in testCheckPermissionExists()
81 @EnableCompatChanges(PackageManager.FILTER_APPLICATION_QUERY)
87 @DisableCompatChanges(PackageManager.FILTER_APPLICATION_QUERY)
90 final PackageManager pm = in testCheckPermissionDoesntExist()
100 @EnableCompatChanges(PackageManager.FILTER_APPLICATION_QUERY)
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DComponentTest.java19 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
20 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
21 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
22 import static android.content.pm.PackageManager.GET_DISABLED_COMPONENTS;
53 private PackageManager mPackageManager;
136 PackageManager.DONT_KILL_APP); in testResolveDisabledActivity()
152 PackageManager.DONT_KILL_APP); in testResolveEnabledActivity()
165 PackageManager.DONT_KILL_APP); in testQueryDisabledActivity()
185 PackageManager.DONT_KILL_APP); in testQueryEnabledActivity()
200 PackageManager.DONT_KILL_APP); in testGetDisabledActivityInfo()
[all …]
DPackageManagerTests.java36 import android.content.pm.PackageManager.NameNotFoundException;
198 private PackageManager getPm() { in getPm()
373 if ((flags & PackageManager.INSTALL_INTERNAL) != 0) { in getInstallLoc()
608 final PackageManager pm = getPm(); in assertPermissions()
619 PackageManager.GET_PERMISSIONS in assertPermissions()
620 | PackageManager.MATCH_UNINSTALLED_PACKAGES); in assertPermissions()
675 if (pm.checkPermission(cmd, pkg) != PackageManager.PERMISSION_GRANTED) { in assertPermissions()
679 if (pm.checkPermission(cmd, pkg) != PackageManager.PERMISSION_DENIED) { in assertPermissions()
689 PackageManager pm = mContext.getPackageManager(); in getParsedPackage()
703 PackageManager pm = mContext.getPackageManager(); in installFromRawResource()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageVerificationStateTest.java19 import android.content.pm.PackageManager;
37 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall()
53 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
74 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndOneSufficient_RequiredDeniedInstall()
79 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_RequiredAndOneSufficient_RequiredDeniedInstall()
100 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_RequiredAndOneSufficient_SufficientDeniedInstall()
105 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndOneSufficient_SufficientDeniedInstall()
127 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_OneSufficientIsEnough()
132 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_OneSufficientIsEnough()
154 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_SecondSufficientIsEnough()
[all …]
/frameworks/base/services/core/java/com/android/server/media/
DMediaButtonReceiverHolder.java27 import android.content.pm.PackageManager;
121 PackageManager pm = context.getPackageManager(); in create()
279 PackageManager pm = context.getPackageManager(); in getComponentType()
282 PackageManager.MATCH_DIRECT_BOOT_AWARE in getComponentType()
283 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in getComponentType()
284 | PackageManager.GET_ACTIVITIES); in getComponentType()
288 } catch (PackageManager.NameNotFoundException e) { in getComponentType()
292 PackageManager.MATCH_DIRECT_BOOT_AWARE in getComponentType()
293 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in getComponentType()
294 | PackageManager.GET_SERVICES); in getComponentType()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/parsing/
DAndroidPackageParsingEquivalenceTest.kt19 import android.content.pm.PackageManager
38 val flags = PackageManager.GET_META_DATA or PackageManager.GET_SHARED_LIBRARY_FILES in applicationInfoEquality()
58 val flags = PackageManager.GET_ACTIVITIES or in packageInfoEquality()
59 PackageManager.GET_CONFIGURATIONS or in packageInfoEquality()
60 PackageManager.GET_GIDS or in packageInfoEquality()
61 PackageManager.GET_INSTRUMENTATION or in packageInfoEquality()
62 PackageManager.GET_META_DATA or in packageInfoEquality()
63 PackageManager.GET_PERMISSIONS or in packageInfoEquality()
64 PackageManager.GET_PROVIDERS or in packageInfoEquality()
65 PackageManager.GET_RECEIVERS or in packageInfoEquality()
[all …]
DAndroidPackageInfoFlagBehaviorTest.kt21 import android.content.pm.PackageManager in <lambda>()
75 pkgInfo(PackageManager.GET_ACTIVITIES) { listOf(it.activities) }, in <lambda>()
76 pkgInfo(PackageManager.GET_GIDS) { listOf(it.gids) }, in <lambda>()
77 pkgInfo(PackageManager.GET_INSTRUMENTATION) { listOf(it.instrumentation) }, in <lambda>()
78 pkgInfo(PackageManager.GET_META_DATA) { listOf(it.applicationInfo.metaData) }, in <lambda>()
79 pkgInfo(PackageManager.GET_PROVIDERS) { listOf(it.providers) }, in <lambda>()
80 pkgInfo(PackageManager.GET_RECEIVERS) { listOf(it.receivers) }, in <lambda>()
81 pkgInfo(PackageManager.GET_SERVICES) { listOf(it.services) }, in <lambda>()
82 pkgInfo(PackageManager.GET_SIGNATURES) { listOf(it.signatures) }, in <lambda>()
83 pkgInfo(PackageManager.GET_SIGNING_CERTIFICATES) { listOf(it.signingInfo) }, in <lambda>()
[all …]
/frameworks/base/core/java/android/service/voice/
DVoiceInteractionServiceInfo.java22 import android.content.pm.PackageManager;
50 public VoiceInteractionServiceInfo(PackageManager pm, ComponentName comp) in VoiceInteractionServiceInfo()
51 throws PackageManager.NameNotFoundException { in VoiceInteractionServiceInfo()
52 this(pm, pm.getServiceInfo(comp, PackageManager.GET_META_DATA)); in VoiceInteractionServiceInfo()
55 public VoiceInteractionServiceInfo(PackageManager pm, ComponentName comp, int userHandle) in VoiceInteractionServiceInfo()
56 throws PackageManager.NameNotFoundException { in VoiceInteractionServiceInfo()
61 throws PackageManager.NameNotFoundException { in getServiceInfoOrThrow()
64 PackageManager.GET_META_DATA in getServiceInfoOrThrow()
65 | PackageManager.MATCH_DIRECT_BOOT_AWARE in getServiceInfoOrThrow()
66 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in getServiceInfoOrThrow()
[all …]
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageTrackerHelperImpl.java24 import android.content.pm.PackageManager;
41 private final PackageManager mPackageManager;
77 throws PackageManager.NameNotFoundException { in getInstalledPackageVersion()
78 int flags = PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS; in getInstalledPackageVersion()
84 public boolean isPrivilegedApp(String packageName) throws PackageManager.NameNotFoundException { in isPrivilegedApp()
85 int flags = PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS; in isPrivilegedApp()
92 throws PackageManager.NameNotFoundException { in usesPermission()
93 int flags = PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in usesPermission()
94 | PackageManager.GET_PERMISSIONS; in usesPermission()
109 int flags = PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS; in contentProviderRegistered()
[all …]
DPackageManagerHelper.java20 import android.content.pm.PackageManager;
30 throws PackageManager.NameNotFoundException; in getInstalledPackageVersion()
32 boolean isPrivilegedApp(String packageName) throws PackageManager.NameNotFoundException; in isPrivilegedApp()
35 throws PackageManager.NameNotFoundException; in usesPermission()
40 throws PackageManager.NameNotFoundException; in receiverRegistered()
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java19 import android.content.pm.PackageManager;
93 return PackageManager.PERMISSION_DENIED; in requestPriority()
102 return PackageManager.PERMISSION_DENIED; in requestPriority()
111 return PackageManager.PERMISSION_DENIED; in requestPriority()
113 return PackageManager.PERMISSION_GRANTED; in requestPriority()
121 return PackageManager.PERMISSION_DENIED; in requestCpusetBoost()
127 return PackageManager.PERMISSION_DENIED; in requestCpusetBoost()
141 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost()
166 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost()
175 return PackageManager.PERMISSION_DENIED; in enableCpusetBoost()
[all …]
/frameworks/base/telephony/common/com/android/internal/telephony/
DCarrierAppUtils.java23 import android.content.pm.PackageManager;
145 PackageManager packageManager = context.getPackageManager(); in disableCarrierAppsUntilPrivileged()
175 packageName, PackageManager.SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_HIDDEN); in disableCarrierAppsUntilPrivileged()
180 PackageManager.SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_HIDDEN); in disableCarrierAppsUntilPrivileged()
190 == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT in disableCarrierAppsUntilPrivileged()
192 == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED in disableCarrierAppsUntilPrivileged()
199 packageName, PackageManager.SYSTEM_APP_STATE_INSTALLED); in disableCarrierAppsUntilPrivileged()
204 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in disableCarrierAppsUntilPrivileged()
205 PackageManager.DONT_KILL_APP); in disableCarrierAppsUntilPrivileged()
225 == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT in disableCarrierAppsUntilPrivileged()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DNekoActivationActivity.java19 import android.content.pm.PackageManager;
38 final PackageManager pm = getPackageManager(); in onStart()
41 == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in onStart()
46 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, in onStart()
47 PackageManager.DONT_KILL_APP); in onStart()
56 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in onStart()
57 PackageManager.DONT_KILL_APP); in onStart()
/frameworks/opt/net/wifi/tests/mts/src/android/net/wifi/mts/
DWifiFeature.java20 import android.content.pm.PackageManager;
24 PackageManager packageManager = context.getPackageManager(); in isWifiSupported()
25 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI); in isWifiSupported()
29 PackageManager packageManager = context.getPackageManager(); in isP2pSupported()
30 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT); in isP2pSupported()
/frameworks/base/packages/SystemUI/src/com/android/systemui/plugins/
DPluginEnablerImpl.java20 import android.content.pm.PackageManager;
28 private PackageManager mPm;
35 @VisibleForTesting public PluginEnablerImpl(Context context, PackageManager pm) { in PluginEnablerImpl()
49 final int desiredState = enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED in setDisabled()
50 : PackageManager.COMPONENT_ENABLED_STATE_DISABLED; in setDisabled()
51 mPm.setComponentEnabledSetting(component, desiredState, PackageManager.DONT_KILL_APP); in setDisabled()
62 != PackageManager.COMPONENT_ENABLED_STATE_DISABLED; in isEnabled()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/
DSideLoadedAppDetector.java25 import android.content.pm.PackageManager;
48 private final PackageManager mPackageManager;
53 public SideLoadedAppDetector(@Main Resources resources, PackageManager packageManager, in SideLoadedAppDetector()
65 PackageManager.MATCH_DIRECT_BOOT_AWARE in hasUnsafeInstalledApps()
66 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, in hasUnsafeInstalledApps()
99 PackageManager.MATCH_DIRECT_BOOT_AWARE in isSafe()
100 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, in isSafe()
107 } catch (PackageManager.NameNotFoundException e) { in isSafe()
132 } catch (IllegalArgumentException | PackageManager.NameNotFoundException e) { in isSafe()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DPreviewInflater.java22 import android.content.pm.PackageManager;
88 } catch (PackageManager.NameNotFoundException|RuntimeException e) { in inflateWidgetView()
95 PackageManager packageManager = mContext.getPackageManager(); in getWidgetInfoFromService()
99 componentName, PackageManager.GET_META_DATA).metaData; in getWidgetInfoFromService()
101 } catch (PackageManager.NameNotFoundException e) { in getWidgetInfoFromService()
124 PackageManager packageManager = mContext.getPackageManager(); in getWidgetInfo()
125 int flags = PackageManager.MATCH_DEFAULT_ONLY in getWidgetInfo()
126 | PackageManager.MATCH_DIRECT_BOOT_AWARE in getWidgetInfo()
127 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE; in getWidgetInfo()
134 flags | PackageManager.GET_META_DATA, in getWidgetInfo()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DWifiPermissionsUtil.java25 import android.content.pm.PackageManager;
74 return permission == PackageManager.PERMISSION_GRANTED; in checkConfigOverridePermission()
104 } catch (PackageManager.NameNotFoundException e) { in isTargetSdkLessThan()
137 == PackageManager.PERMISSION_DENIED) { in checkCallersLocationPermission()
185 == PackageManager.PERMISSION_DENIED) { in checkCallersFineLocationPermission()
204 == PackageManager.PERMISSION_GRANTED; in checkCallersHardwareLocationPermission()
360 == PackageManager.PERMISSION_GRANTED; in checkCallerHasPeersMacAddressPermission()
377 == PackageManager.PERMISSION_GRANTED; in checkInteractAcrossUsersFull()
433 == PackageManager.PERMISSION_GRANTED; in checkNetworkSettingsPermission()
442 == PackageManager.PERMISSION_GRANTED; in checkScanWithoutLocationPermission()
[all …]
/frameworks/base/services/core/java/com/android/server/policy/
DSoftRestrictedPermissionPolicy.java24 import static android.content.pm.PackageManager.FLAG_PERMISSION_APPLY_RESTRICTION;
25 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT;
26 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT;
27 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT;
28 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
37 import android.content.pm.PackageManager;
86 PackageManager pm = context.getPackageManager(); in getMinimumTargetSDK()
97 } catch (PackageManager.NameNotFoundException e) { in getMinimumTargetSDK()
135 PackageManager pm = context.getPackageManager(); in forPermission()
216 PackageManager packageManager = context.getPackageManager();
[all …]
DShortcutManager.java23 import android.content.pm.PackageManager;
105 PackageManager packageManager = mContext.getPackageManager(); in loadShortcuts()
143 PackageManager.MATCH_DIRECT_BOOT_AWARE in loadShortcuts()
144 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in loadShortcuts()
145 | PackageManager.MATCH_UNINSTALLED_PACKAGES); in loadShortcuts()
146 } catch (PackageManager.NameNotFoundException e) { in loadShortcuts()
152 PackageManager.MATCH_DIRECT_BOOT_AWARE in loadShortcuts()
153 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in loadShortcuts()
154 | PackageManager.MATCH_UNINSTALLED_PACKAGES); in loadShortcuts()
155 } catch (PackageManager.NameNotFoundException e1) { in loadShortcuts()
/frameworks/base/packages/StatementService/src/com/android/statementservice/
DIntentFilterVerificationReceiver.java22 import android.content.pm.PackageManager;
23 import android.content.pm.PackageManager.NameNotFoundException;
69 private static void sendErrorToPackageManager(PackageManager packageManager, in sendErrorToPackageManager()
72 PackageManager.INTENT_FILTER_VERIFICATION_FAILURE, in sendErrorToPackageManager()
86 PackageManager.EXTRA_INTENT_FILTER_VERIFICATION_ID); in onReceive()
88 PackageManager.EXTRA_INTENT_FILTER_VERIFICATION_URI_SCHEME); in onReceive()
90 PackageManager.EXTRA_INTENT_FILTER_VERIFICATION_HOSTS); in onReceive()
92 PackageManager.EXTRA_INTENT_FILTER_VERIFICATION_PACKAGE_NAME); in onReceive()
186 private final PackageManager mPackageManager;
188 public IsAssociatedResultReceiver(Handler handler, PackageManager packageManager, in IsAssociatedResultReceiver()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/
DDefaultAppInfo.java25 import android.content.pm.PackageManager;
41 protected final PackageManager mPm;
44 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn) { in DefaultAppInfo()
48 public DefaultAppInfo(Context context, PackageManager pm, int uid, PackageItemInfo info) { in DefaultAppInfo()
52 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn, in DefaultAppInfo()
63 public DefaultAppInfo(Context context, PackageManager pm, int uid, PackageItemInfo info, in DefaultAppInfo()
86 } catch (PackageManager.NameNotFoundException e) { in loadLabel()
110 } catch (PackageManager.NameNotFoundException e) { in loadIcon()
119 } catch (PackageManager.NameNotFoundException e) { in loadIcon()
/frameworks/base/core/java/android/content/pm/
DPackageItemInfo.java205 public @NonNull CharSequence loadLabel(@NonNull PackageManager pm) { in loadLabel()
215 public CharSequence loadUnsafeLabel(PackageManager pm) { in loadUnsafeLabel()
237 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { in loadSafeLabel()
250 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm, in loadSafeLabel()
270 public Drawable loadIcon(PackageManager pm) { in loadIcon()
287 public Drawable loadUnbadgedIcon(PackageManager pm) { in loadUnbadgedIcon()
302 public Drawable loadBanner(PackageManager pm) { in loadBanner()
323 public Drawable loadDefaultIcon(PackageManager pm) { in loadDefaultIcon()
338 protected Drawable loadDefaultBanner(PackageManager pm) { in loadDefaultBanner()
353 public Drawable loadLogo(PackageManager pm) { in loadLogo()
[all …]
DAppsQueryHelper.java172 PackageManager.MATCH_UNINSTALLED_PACKAGES in getAllApps()
173 | PackageManager.MATCH_DISABLED_COMPONENTS, userId).getList(); in getAllApps()
183 PackageManager.MATCH_DISABLED_COMPONENTS in queryIntentActivitiesAsUser()
184 | PackageManager.MATCH_UNINSTALLED_PACKAGES in queryIntentActivitiesAsUser()
185 | PackageManager.MATCH_DIRECT_BOOT_AWARE in queryIntentActivitiesAsUser()
186 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, in queryIntentActivitiesAsUser()
197 PackageManager.GET_META_DATA in queryIntentServicesAsUser()
198 | PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in queryIntentServicesAsUser()
199 | PackageManager.MATCH_DIRECT_BOOT_AWARE in queryIntentServicesAsUser()
200 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, userId) in queryIntentServicesAsUser()

12345678910>>...39