Home
last modified time | relevance | path

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

12345678910>>...22

/frameworks/base/core/tests/coretests/src/android/content/pm/
DPackageManagerTests.java33 import android.content.pm.PackageManager.NameNotFoundException;
205 private PackageManager getPm() { in getPm()
238 if (observer.returnCode != PackageManager.INSTALL_SUCCEEDED) { in invokeInstallPackage()
243 if (observer.returnCode == PackageManager.INSTALL_SUCCEEDED) { in invokeInstallPackage()
354 if ((flags & PackageManager.INSTALL_EXTERNAL) != 0) { in getInstallLoc()
356 } else if ((flags & PackageManager.INSTALL_INTERNAL) != 0) { in getInstallLoc()
427 if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0) { in assertInstall()
462 if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0) { in assertInstall()
611 final PackageManager pm = getPm(); in assertPermissions()
622 PackageManager.GET_PERMISSIONS in assertPermissions()
[all …]
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;
52 private PackageManager mPackageManager;
135 PackageManager.DONT_KILL_APP); in testResolveDisabledActivity()
151 PackageManager.DONT_KILL_APP); in testResolveEnabledActivity()
164 PackageManager.DONT_KILL_APP); in testQueryDisabledActivity()
184 PackageManager.DONT_KILL_APP); in testQueryEnabledActivity()
199 PackageManager.DONT_KILL_APP); in testGetDisabledActivityInfo()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java21 import android.content.pm.PackageManager;
85 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(null); in testDisableCarrierAppsUntilPrivileged_MissingApp()
103 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
125 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
127 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
145 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DISABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled()
147 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled()
165 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled()
167 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled()
185 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_UpdatedApp()
[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/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_DISABLED_COMPONENTS;
25 import static android.content.pm.PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS;
26 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE;
27 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
28 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
[all …]
DPackageItemInfo.java134 public CharSequence loadLabel(PackageManager pm) { in loadLabel()
167 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { in loadSafeLabel()
218 public Drawable loadIcon(PackageManager pm) { in loadIcon()
235 public Drawable loadUnbadgedIcon(PackageManager pm) { in loadUnbadgedIcon()
250 public Drawable loadBanner(PackageManager pm) { in loadBanner()
271 public Drawable loadDefaultIcon(PackageManager pm) { in loadDefaultIcon()
286 protected Drawable loadDefaultBanner(PackageManager pm) { in loadDefaultBanner()
301 public Drawable loadLogo(PackageManager pm) { in loadLogo()
322 protected Drawable loadDefaultLogo(PackageManager pm) { in loadDefaultLogo()
339 public XmlResourceParser loadXmlMetaData(PackageManager pm, String name) { in loadXmlMetaData()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DPreviewInflater.java23 import android.content.pm.PackageManager;
85 } catch (PackageManager.NameNotFoundException|RuntimeException e) { in inflateWidgetView()
92 PackageManager packageManager = mContext.getPackageManager(); in getWidgetInfoFromService()
96 componentName, PackageManager.GET_META_DATA).metaData; in getWidgetInfoFromService()
98 } catch (PackageManager.NameNotFoundException e) { in getWidgetInfoFromService()
121 PackageManager packageManager = mContext.getPackageManager(); in getWidgetInfo()
122 int flags = PackageManager.MATCH_DEFAULT_ONLY in getWidgetInfo()
123 | PackageManager.MATCH_DIRECT_BOOT_AWARE in getWidgetInfo()
124 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE; in getWidgetInfo()
131 flags | PackageManager.GET_META_DATA, in getWidgetInfo()
[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/packages/EasterEgg/src/com/android/egg/neko/
DNekoActivationActivity.java19 import android.content.pm.PackageManager;
36 final PackageManager pm = getPackageManager(); in onStart()
38 if (pm.getComponentEnabledSetting(cn) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) { in onStart()
42 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, in onStart()
43 PackageManager.DONT_KILL_APP); in onStart()
50 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in onStart()
51 PackageManager.DONT_KILL_APP); in onStart()
/frameworks/base/services/core/java/com/android/server/webkit/
DSystemImpl.java25 import android.content.pm.PackageManager;
26 import android.content.pm.PackageManager.NameNotFoundException;
157 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getFactoryPackageVersion()
158 return pm.getPackageInfo(packageName, PackageManager.MATCH_FACTORY_ONLY).versionCode; in getFactoryPackageVersion()
224 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in uninstallAndDisablePackageForAllUsers()
231 }, PackageManager.DELETE_SYSTEM_APP | PackageManager.DELETE_ALL_USERS); in uninstallAndDisablePackageForAllUsers()
250 enable ? PackageManager.COMPONENT_ENABLED_STATE_DEFAULT : in enablePackageForUser()
251 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER, 0, in enablePackageForUser()
267 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getPackageInfoForProvider()
272 private final static int PACKAGE_FLAGS = PackageManager.GET_META_DATA
[all …]
/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/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()
/frameworks/base/telephony/java/com/android/internal/telephony/
DCarrierAppUtils.java23 import android.content.pm.PackageManager;
149 PackageManager.COMPONENT_ENABLED_STATE_DEFAULT in disableCarrierAppsUntilPrivileged()
151 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED)) { in disableCarrierAppsUntilPrivileged()
156 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in disableCarrierAppsUntilPrivileged()
157 PackageManager.DONT_KILL_APP, in disableCarrierAppsUntilPrivileged()
167 PackageManager.COMPONENT_ENABLED_STATE_DEFAULT in disableCarrierAppsUntilPrivileged()
169 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) { in disableCarrierAppsUntilPrivileged()
174 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in disableCarrierAppsUntilPrivileged()
175 PackageManager.DONT_KILL_APP, in disableCarrierAppsUntilPrivileged()
189 PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) { in disableCarrierAppsUntilPrivileged()
[all …]
/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()
/frameworks/support/core-utils/java/android/support/v4/content/
DPermissionChecker.java20 import android.content.pm.PackageManager;
56 public static final int PERMISSION_GRANTED = PackageManager.PERMISSION_GRANTED;
59 public static final int PERMISSION_DENIED = PackageManager.PERMISSION_DENIED;
62 public static final int PERMISSION_DENIED_APP_OP = PackageManager.PERMISSION_DENIED - 1;
89 if (context.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_DENIED) { in checkPermission()
143 return PackageManager.PERMISSION_DENIED; in checkCallingPermission()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/
DCameraBinderTestUtils.java9 import android.content.pm.PackageManager;
50 PackageManager.FEATURE_CAMERA_FRONT)) { in guessNumCameras()
56 PackageManager.FEATURE_CAMERA)) { in guessNumCameras()
63 PackageManager.FEATURE_CAMERA_ANY)) { in guessNumCameras()
72 final PackageManager packageManager = context.getPackageManager(); in isFeatureAvailable()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tv/pip/
DPipUI.java19 import android.content.pm.PackageManager;
24 import static android.content.pm.PackageManager.FEATURE_LEANBACK;
25 import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
35 PackageManager pm = mContext.getPackageManager(); in start()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/users/
DAppRestrictionsHelper.java26 import android.content.pm.PackageManager;
53 private final PackageManager mPackageManager;
108 PackageManager.MATCH_UNINSTALLED_PACKAGES, userId); in applyUserAppState()
134 PackageManager.DELETE_SYSTEM_APP); in applyUserAppState()
154 final PackageManager pm = mPackageManager; in fetchAndMergeApps()
174 PackageManager.MATCH_UNINSTALLED_PACKAGES); in fetchAndMergeApps()
198 } catch (PackageManager.NameNotFoundException re) { in fetchAndMergeApps()
208 PackageManager.MATCH_UNINSTALLED_PACKAGES, mUser.getIdentifier()); in fetchAndMergeApps()
293 final PackageManager pm = mPackageManager; in addSystemApps()
295PackageManager.MATCH_DISABLED_COMPONENTS | PackageManager.MATCH_UNINSTALLED_PACKAGES); in addSystemApps()
[all …]
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/
DPowerTest.java23 import android.content.pm.PackageManager;
54 PackageManager pm = getPackageManager();
57 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
63 PackageManager pm = getPackageManager();
66 PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
/frameworks/base/core/java/com/android/internal/content/
DNativeLibraryHelper.java19 import static android.content.pm.PackageManager.INSTALL_FAILED_NO_MATCHING_ABIS;
20 import static android.content.pm.PackageManager.INSTALL_SUCCEEDED;
21 import static android.content.pm.PackageManager.NO_NATIVE_LIBRARIES;
29 import android.content.pm.PackageManager;
317 if (copyRet != PackageManager.INSTALL_SUCCEEDED) { in copyNativeBinariesForSupportedAbi()
336 int copyRet = PackageManager.NO_NATIVE_LIBRARIES; in copyNativeBinariesWithOverride()
340 if (copyRet < 0 && copyRet != PackageManager.NO_NATIVE_LIBRARIES && in copyNativeBinariesWithOverride()
341 copyRet != PackageManager.INSTALL_FAILED_NO_MATCHING_ABIS) { in copyNativeBinariesWithOverride()
350 if (copyRet < 0 && copyRet != PackageManager.NO_NATIVE_LIBRARIES && in copyNativeBinariesWithOverride()
351 copyRet != PackageManager.INSTALL_FAILED_NO_MATCHING_ABIS) { in copyNativeBinariesWithOverride()
[all …]
/frameworks/support/compat/tests/java/android/support/v4/content/
DContextCompatTest.java22 import android.content.pm.PackageManager;
138 assertEquals("Vibrate permission granted", PackageManager.PERMISSION_GRANTED, in testCheckSelfPermission()
141 assertEquals("Wake lock permission granted", PackageManager.PERMISSION_GRANTED, in testCheckSelfPermission()
147 assertEquals("Access network state permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
150 assertEquals("Bluetooth permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
153 assertEquals("Call phone permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
156 assertEquals("Delete packages permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java19 import android.content.pm.PackageManager;
51 return PackageManager.PERMISSION_DENIED; in requestPriority()
61 return PackageManager.PERMISSION_DENIED; in requestPriority()
63 return PackageManager.PERMISSION_GRANTED; in requestPriority()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageVerificationState.java21 import android.content.pm.PackageManager;
87 case PackageManager.VERIFICATION_ALLOW_WITHOUT_SUFFICIENT: in setVerifierResponse()
90 case PackageManager.VERIFICATION_ALLOW: in setVerifierResponse()
99 if (code == PackageManager.VERIFICATION_ALLOW) { in setVerifierResponse()
/frameworks/base/core/java/android/app/
DWallpaperInfo.java25 import android.content.pm.PackageManager;
28 import android.content.pm.PackageManager.NameNotFoundException;
92 PackageManager pm = context.getPackageManager(); in WallpaperInfo()
213 public CharSequence loadLabel(PackageManager pm) { in loadLabel()
223 public Drawable loadIcon(PackageManager pm) { in loadIcon()
233 public Drawable loadThumbnail(PackageManager pm) { in loadThumbnail()
244 public CharSequence loadAuthor(PackageManager pm) throws NotFoundException { in loadAuthor()
258 public CharSequence loadDescription(PackageManager pm) throws NotFoundException { in loadDescription()
281 public Uri loadContextUri(PackageManager pm) throws NotFoundException { in loadContextUri()
303 public CharSequence loadContextDescription(PackageManager pm) throws NotFoundException { in loadContextDescription()
/frameworks/base/docs/html-intl/intl/ja/training/monitoring-device-state/
Dmanifest-receivers.jd38 <p>{@link android.content.pm.PackageManager} を使用すると、マニフェスト内で定義されているコンポーネントの有効化状態を切り替えることができます。このコンポ…
42 PackageManager pm = context.getPackageManager();
45 PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
46 PackageManager.DONT_KILL_APP)</pre>

12345678910>>...22