Home
last modified time | relevance | path

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

12345678910>>...21

/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/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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java21 import android.content.pm.PackageManager;
61 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(null); in testDisableCarrierAppsUntilPrivileged_MissingApp()
78 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
100 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
102 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser()
120 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DISABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled()
122 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled()
140 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled()
142 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled()
160 appInfo.enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in testDisableCarrierAppsUntilPrivileged_HasPrivileges_UpdatedApp()
[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;
34 final PackageManager pm = getPackageManager(); in onStart()
36 if (pm.getComponentEnabledSetting(cn) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) { in onStart()
40 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, in onStart()
41 PackageManager.DONT_KILL_APP); in onStart()
47 pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in onStart()
48 PackageManager.DONT_KILL_APP); in onStart()
/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()
123 intent, PackageManager.MATCH_DEFAULT_ONLY, KeyguardUpdateMonitor.getCurrentUser()); in getWidgetInfo()
128 PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_META_DATA, in getWidgetInfo()
151 PackageManager packageManager = ctx.getPackageManager(); in getTargetActivityInfo()
153 intent, PackageManager.MATCH_DEFAULT_ONLY, currentUserId); in getTargetActivityInfo()
[all …]
/frameworks/support/v4/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()
150 assertEquals("Read contacts permission granted", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
153 assertEquals("Write contacts permission granted", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
158 assertEquals("Read contacts permission denied", PackageManager.PERMISSION_GRANTED, in testCheckSelfPermission()
161 assertEquals("Write contacts permission denied", PackageManager.PERMISSION_GRANTED, in testCheckSelfPermission()
168 assertEquals("Access network state permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
171 assertEquals("Bluetooth permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
174 assertEquals("Call phone permission denied", PackageManager.PERMISSION_DENIED, in testCheckSelfPermission()
[all …]
/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/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/v4/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/telephony/java/com/android/internal/telephony/
DCarrierAppUtils.java22 import android.content.pm.PackageManager;
119 && (ai.enabledSetting == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT in disableCarrierAppsUntilPrivileged()
121 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED)) { in disableCarrierAppsUntilPrivileged()
125 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, in disableCarrierAppsUntilPrivileged()
126 PackageManager.DONT_KILL_APP, userId, callingPackage); in disableCarrierAppsUntilPrivileged()
129 PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) { in disableCarrierAppsUntilPrivileged()
133 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED, 0, in disableCarrierAppsUntilPrivileged()
219 PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, userId); in getDefaultCarrierAppCandidatesHelper()
/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/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/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/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/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/services/core/java/com/android/server/os/
DSchedulingPolicyService.java19 import android.content.pm.PackageManager;
51 return PackageManager.PERMISSION_DENIED; in requestPriority()
60 return PackageManager.PERMISSION_DENIED; in requestPriority()
62 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;
87 PackageManager pm = context.getPackageManager(); in WallpaperInfo()
190 public CharSequence loadLabel(PackageManager pm) { in loadLabel()
200 public Drawable loadIcon(PackageManager pm) { in loadIcon()
210 public Drawable loadThumbnail(PackageManager pm) { in loadThumbnail()
221 public CharSequence loadAuthor(PackageManager pm) throws NotFoundException { in loadAuthor()
235 public CharSequence loadDescription(PackageManager pm) throws NotFoundException { in loadDescription()
/frameworks/base/docs/html-intl/intl/zh-cn/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>>...21