/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | PackageManagerTests.java | 33 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 …]
|
D | ComponentTest.java | 19 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/ |
D | CarrierAppUtilsTest.java | 21 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/ |
D | PackageVerificationStateTest.java | 19 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 …]
|
D | PackageManagerPresubmitTest.java | 21 import android.content.pm.PackageManager; 39 import static android.content.pm.PackageManager.GET_PERMISSIONS; 51 private PackageManager mPackageManager; 67 public void testPrivAppPermissions() throws PackageManager.NameNotFoundException { in testPrivAppPermissions() 69 .getInstalledPackages(PackageManager.MATCH_UNINSTALLED_PACKAGES | GET_PERMISSIONS); in testPrivAppPermissions() 81 throws PackageManager.NameNotFoundException { in testPackagePrivAppPermission() 97 } catch (PackageManager.NameNotFoundException e) { in testPackagePrivAppPermission()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | PreviewInflater.java | 23 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/content/pm/ |
D | PackageUserState.java | 19 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 …]
|
D | AppsQueryHelper.java | 172 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()
|
D | PackageItemInfo.java | 130 public CharSequence loadLabel(PackageManager pm) { in loadLabel() 163 public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { in loadSafeLabel() 214 public Drawable loadIcon(PackageManager pm) { in loadIcon() 231 public Drawable loadUnbadgedIcon(PackageManager pm) { in loadUnbadgedIcon() 246 public Drawable loadBanner(PackageManager pm) { in loadBanner() 267 public Drawable loadDefaultIcon(PackageManager pm) { in loadDefaultIcon() 282 protected Drawable loadDefaultBanner(PackageManager pm) { in loadDefaultBanner() 297 public Drawable loadLogo(PackageManager pm) { in loadLogo() 318 protected Drawable loadDefaultLogo(PackageManager pm) { in loadDefaultLogo() 335 public XmlResourceParser loadXmlMetaData(PackageManager pm, String name) { in loadXmlMetaData() [all …]
|
/frameworks/base/core/java/android/service/voice/ |
D | VoiceInteractionServiceInfo.java | 22 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/ |
D | NekoActivationActivity.java | 19 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/support/compat/tests/java/android/support/v4/provider/ |
D | FontsContractCompatTest.java | 38 import android.content.pm.PackageManager; 39 import android.content.pm.PackageManager.NameNotFoundException; 76 PackageManager manager = context.getPackageManager(); 78 context.getPackageName(), PackageManager.GET_SIGNATURES); 85 } catch (PackageManager.NameNotFoundException e) { 281 PackageManager packageManager = mock(PackageManager.class); in testGetProvider_providerNotFound() 295 throws PackageManager.NameNotFoundException { in testGetProvider_noCerts() 296 PackageManager packageManager = mContext.getPackageManager(); in testGetProvider_noCerts() 306 throws PackageManager.NameNotFoundException { in testGetProvider_wrongCerts() 307 PackageManager packageManager = mock(PackageManager.class); in testGetProvider_wrongCerts() [all …]
|
/frameworks/base/core/java/android/service/autofill/ |
D | AutofillServiceInfo.java | 23 import android.content.pm.PackageManager; 48 throws PackageManager.NameNotFoundException { in getServiceInfoOrThrow() 52 PackageManager.GET_META_DATA, in getServiceInfoOrThrow() 59 throw new PackageManager.NameNotFoundException(comp.toString()); in getServiceInfoOrThrow() 68 public AutofillServiceInfo(PackageManager pm, ComponentName comp, int userHandle) in AutofillServiceInfo() 69 throws PackageManager.NameNotFoundException { in AutofillServiceInfo() 73 public AutofillServiceInfo(PackageManager pm, ServiceInfo si) { in AutofillServiceInfo() 90 private static TypedArray getMetaDataArray(PackageManager pm, ServiceInfo si) { in getMetaDataArray() 131 } catch (PackageManager.NameNotFoundException e) { in getMetaDataArray()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/ |
D | TunerService.java | 24 import android.content.pm.PackageManager; 25 import android.content.pm.PackageManager.NameNotFoundException; 68 enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED in setTunerEnabled() 69 : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, in setTunerEnabled() 70 PackageManager.DONT_KILL_APP); in setTunerEnabled() 74 enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED in setTunerEnabled() 75 : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, in setTunerEnabled() 76 PackageManager.DONT_KILL_APP); in setTunerEnabled() 82 == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in isTunerEnabled()
|
/frameworks/base/packages/StatementService/src/com/android/statementservice/ |
D | IntentFilterVerificationReceiver.java | 22 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/ |
D | ShortcutManager.java | 23 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/ |
D | DessertCase.java | 21 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/base/telephony/java/com/android/internal/telephony/ |
D | CarrierAppUtils.java | 23 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/services/core/java/com/android/server/webkit/ |
D | SystemImpl.java | 25 import android.content.pm.PackageManager; 26 import android.content.pm.PackageManager.NameNotFoundException; 160 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getFactoryPackageVersion() 161 return pm.getPackageInfo(packageName, PackageManager.MATCH_FACTORY_ONLY).versionCode; in getFactoryPackageVersion() 227 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in uninstallAndDisablePackageForAllUsers() 234 }, PackageManager.DELETE_SYSTEM_APP | PackageManager.DELETE_ALL_USERS); in uninstallAndDisablePackageForAllUsers() 253 enable ? PackageManager.COMPONENT_ENABLED_STATE_DEFAULT : in enablePackageForUser() 254 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER, 0, in enablePackageForUser() 270 PackageManager pm = AppGlobals.getInitialApplication().getPackageManager(); in getPackageInfoForProvider() 303 private final static int PACKAGE_FLAGS = PackageManager.GET_META_DATA [all …]
|
/frameworks/base/services/core/java/com/android/server/os/ |
D | SchedulingPolicyService.java | 19 import android.content.pm.PackageManager; 54 return PackageManager.PERMISSION_DENIED; in requestPriority() 63 return PackageManager.PERMISSION_DENIED; in requestPriority() 72 return PackageManager.PERMISSION_DENIED; in requestPriority() 74 return PackageManager.PERMISSION_GRANTED; in requestPriority()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/ |
D | CameraBinderTestUtils.java | 9 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/support/core-utils/java/android/support/v4/content/ |
D | PermissionChecker.java | 22 import android.content.pm.PackageManager; 59 public static final int PERMISSION_GRANTED = PackageManager.PERMISSION_GRANTED; 62 public static final int PERMISSION_DENIED = PackageManager.PERMISSION_DENIED; 65 public static final int PERMISSION_DENIED_APP_OP = PackageManager.PERMISSION_DENIED - 1; 94 if (context.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_DENIED) { in checkPermission() 148 return PackageManager.PERMISSION_DENIED; in checkCallingPermission()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/ |
D | PackageManagerWrapperImpl.java | 23 import android.content.pm.PackageManager; 24 import android.content.pm.PackageManager.NameNotFoundException; 38 private final PackageManager mPm; 40 public PackageManagerWrapperImpl(PackageManager pm) { in PackageManagerWrapperImpl() 45 public PackageManager getPackageManager() { in getPackageManager() 71 throws PackageManager.NameNotFoundException { in getApplicationInfoAsUser()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/users/ |
D | AppRestrictionsHelper.java | 26 import android.content.pm.PackageManager; 55 private final PackageManager mPackageManager; 115 PackageManager.MATCH_ANY_USER, userId); in applyUserAppState() 119 0 /*installFlags*/, PackageManager.INSTALL_REASON_UNKNOWN); in applyUserAppState() 142 PackageManager.DELETE_SYSTEM_APP, mUser.getIdentifier()); in applyUserAppState() 162 final PackageManager pm = mPackageManager; in fetchAndMergeApps() 182 PackageManager.MATCH_ANY_USER); in fetchAndMergeApps() 206 } catch (PackageManager.NameNotFoundException re) { in fetchAndMergeApps() 216 PackageManager.MATCH_UNINSTALLED_PACKAGES, mUser.getIdentifier()); in fetchAndMergeApps() 299 final PackageManager pm = mPackageManager; in addSystemApps() [all …]
|
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/ |
D | PowerTest.java | 23 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);
|