Home
last modified time | relevance | path

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

12345678910>>...34

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java21 import android.content.pm.PackageManager;
95 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_MissingApp()
96 | PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_MissingApp()
97 | PackageManager.MATCH_SYSTEM_ONLY, in testDisableCarrierAppsUntilPrivileged_MissingApp()
119 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
120 | PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
146 .thenReturn(PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
149 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
150 | PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
151 | PackageManager.MATCH_SYSTEM_ONLY, in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
[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;
195 private PackageManager getPm() { in getPm()
368 if ((flags & PackageManager.INSTALL_INTERNAL) != 0) { in getInstallLoc()
604 final PackageManager pm = getPm(); in assertPermissions()
615 PackageManager.GET_PERMISSIONS in assertPermissions()
616 | PackageManager.MATCH_UNINSTALLED_PACKAGES); in assertPermissions()
671 if (pm.checkPermission(cmd, pkg) != PackageManager.PERMISSION_GRANTED) { in assertPermissions()
675 if (pm.checkPermission(cmd, pkg) != PackageManager.PERMISSION_DENIED) { in assertPermissions()
686 PackageManager pm = mContext.getPackageManager(); in getParsedPackage()
701 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()
52 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
72 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndOneSufficient_RequiredDeniedInstall()
77 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_RequiredAndOneSufficient_RequiredDeniedInstall()
97 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_RequiredAndOneSufficient_SufficientDeniedInstall()
102 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndOneSufficient_SufficientDeniedInstall()
123 state.setVerifierResponse(SUFFICIENT_UID_1, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_OneSufficientIsEnough()
128 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_OneSufficientIsEnough()
149 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_RequiredAndTwoSufficient_SecondSufficientIsEnough()
[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;
94 return PackageManager.PERMISSION_DENIED; in requestPriority()
103 return PackageManager.PERMISSION_DENIED; in requestPriority()
112 return PackageManager.PERMISSION_DENIED; in requestPriority()
114 return PackageManager.PERMISSION_GRANTED; in requestPriority()
122 return PackageManager.PERMISSION_DENIED; in requestCpusetBoost()
128 return PackageManager.PERMISSION_DENIED; in requestCpusetBoost()
142 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost()
167 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost()
176 return PackageManager.PERMISSION_DENIED; in enableCpusetBoost()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DWifiPermissionsUtil.java22 import android.content.pm.PackageManager;
72 return (permission == PackageManager.PERMISSION_GRANTED); in checkConfigOverridePermission()
88 return (permission == PackageManager.PERMISSION_GRANTED); in checkChangePermission()
104 return (permission == PackageManager.PERMISSION_GRANTED); in checkWifiAccessPermission()
135 } catch (PackageManager.NameNotFoundException e) { in isTargetSdkLessThan()
165 == PackageManager.PERMISSION_DENIED) { in checkCallersLocationPermission()
205 == PackageManager.PERMISSION_DENIED) { in checkCallersFineLocationPermission()
228 == PackageManager.PERMISSION_GRANTED; in checkCallersHardwareLocationPermission()
376 == PackageManager.PERMISSION_GRANTED; in checkCallerHasPeersMacAddressPermission()
393 == PackageManager.PERMISSION_GRANTED; in checkInteractAcrossUsersFull()
[all …]
/frameworks/base/core/java/android/content/pm/
DPackageUserState.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_DISABLED_UNTIL_USED;
22 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER;
23 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
24 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE;
25 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
26 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
27 import static android.content.pm.PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS;
28 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
[all …]
DPackageItemInfo.java196 public @NonNull CharSequence loadLabel(@NonNull PackageManager pm) { in loadLabel()
206 public CharSequence loadUnsafeLabel(PackageManager pm) { in loadUnsafeLabel()
228 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { in loadSafeLabel()
241 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm, in loadSafeLabel()
261 public Drawable loadIcon(PackageManager pm) { in loadIcon()
278 public Drawable loadUnbadgedIcon(PackageManager pm) { in loadUnbadgedIcon()
293 public Drawable loadBanner(PackageManager pm) { in loadBanner()
314 public Drawable loadDefaultIcon(PackageManager pm) { in loadDefaultIcon()
329 protected Drawable loadDefaultBanner(PackageManager pm) { in loadDefaultBanner()
344 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()
DPackageInstaller.java34 import android.content.pm.PackageManager.DeleteFlags;
35 import android.content.pm.PackageManager.InstallReason;
550 uninstall(new VersionedPackage(packageName, PackageManager.VERSION_CODE_HIGHEST), in uninstall()
630 PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS, installReason, in installExistingPackage()
1111 throws PackageManager.NameNotFoundException { in transfer()
1117 e.maybeRethrow(PackageManager.NameNotFoundException.class); in transfer()
1269 public int installFlags = PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS;
1273 public @InstallReason int installReason = PackageManager.INSTALL_REASON_UNKNOWN;
1310 public long requiredInstalledVersionCode = PackageManager.VERSION_CODE_HIGHEST;
1381 return (installFlags & (PackageManager.INSTALL_REQUEST_DOWNGRADE in areHiddenOptionsSet()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java37 import android.content.pm.PackageManager;
74 @Mock private PackageManager mMockPkgMgr;
143 .thenReturn(PackageManager.PERMISSION_GRANTED); in testCheckConfigOverridePermissionApproved()
157 .thenReturn(PackageManager.PERMISSION_DENIED); in testCheckConfigOverridePermissionDenied()
327 mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED; in testLegacyAppHasLocationAndAllPermissions()
381 .thenReturn(PackageManager.PERMISSION_DENIED); in testCannotAccessScanResults_LocationModeDisabled()
415 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCannotAccessScanResults_LocationModeDisabledHasChangeWifiState()
450 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCannotAccessScanResults_LocationModeDisabledHasAccessWifiState()
486 .thenReturn(PackageManager.PERMISSION_DENIED); in testEnforceCannotAccessScanResults_LocationModeDisabledHasNoNetworkSettings()
522 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasNetworkSettings()
[all …]
/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/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/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()
DAppUtils.java24 import android.content.pm.PackageManager;
48 IUsbManager usbManager, PackageManager pm, Context context) { in getLaunchByDefaultSummary()
55 status != PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED; in getLaunchByDefaultSummary()
72 public static boolean hasPreferredActivities(PackageManager pm, String packageName) { in hasPreferredActivities()
113 PackageManager packageManager, String packageName) { in getApplicationLabel()
118 PackageManager.MATCH_DISABLED_COMPONENTS in getApplicationLabel()
119 | PackageManager.MATCH_ANY_USER); in getApplicationLabel()
121 } catch (PackageManager.NameNotFoundException e) { in getApplicationLabel()
/frameworks/base/services/core/java/com/android/server/policy/
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()
DSoftRestrictedPermissionPolicy.java26 import static android.content.pm.PackageManager.FLAG_PERMISSION_APPLY_RESTRICTION;
27 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT;
28 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT;
29 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT;
38 import android.content.pm.PackageManager;
90 PackageManager pm = context.getPackageManager(); in getMinimumTargetSDK()
101 } catch (PackageManager.NameNotFoundException e) { in getMinimumTargetSDK()
140 PackageManager pm = context.getPackageManager(); in forPermission()
159 } catch (PackageManager.NameNotFoundException e) { in forPermission()
/frameworks/base/apct-tests/perftests/core/src/android/os/
DPackageManagerPerfTest.java21 import android.content.pm.PackageManager;
49 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testCheckPermissionExists()
60 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testCheckPermissionDoesntExist()
71 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testQueryIntentActivities()
82 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testGetPackageInfo()
93 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testGetApplicationInfo()
104 final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in testGetActivityInfo()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DDessertCase.java21 import android.content.pm.PackageManager;
31 PackageManager pm = getPackageManager(); in onStart()
33 if (pm.getComponentEnabledSetting(cn) != PackageManager.COMPONENT_ENABLED_STATE_ENABLED) { in onStart()
36 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in onStart()
37 PackageManager.DONT_KILL_APP); in onStart()
DActivityIntentHelper.java22 import android.content.pm.PackageManager;
64 PackageManager packageManager = mContext.getPackageManager(); in getTargetActivityInfo()
65 int flags = PackageManager.MATCH_DEFAULT_ONLY; in getTargetActivityInfo()
67 flags |= PackageManager.MATCH_DIRECT_BOOT_AWARE in getTargetActivityInfo()
68 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE; in getTargetActivityInfo()
76 flags | PackageManager.GET_META_DATA, currentUserId); in getTargetActivityInfo()
/frameworks/base/services/core/java/com/android/server/webkit/
DSystemImpl.java23 import android.content.pm.PackageManager;
24 import android.content.pm.PackageManager.NameNotFoundException;
148 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getFactoryPackageVersion()
149 return pm.getPackageInfo(packageName, PackageManager.MATCH_FACTORY_ONLY) in getFactoryPackageVersion()
224 enable ? PackageManager.COMPONENT_ENABLED_STATE_DEFAULT : in enablePackageForUser()
225 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER, 0, in enablePackageForUser()
241 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getPackageInfoForProvider()
282 private final static int PACKAGE_FLAGS = PackageManager.GET_META_DATA
283 | PackageManager.GET_SIGNATURES | PackageManager.GET_SHARED_LIBRARY_FILES
284 | PackageManager.MATCH_DEBUG_TRIAGED_MISSING | PackageManager.MATCH_ANY_USER;

12345678910>>...34