@Implements(value=android.app.ApplicationPackageManager.class, isInAndroidSdk=false, looseSignatures=true) public class ShadowApplicationPackageManager extends ShadowPackageManager
ShadowPackageManager.ComponentState, ShadowPackageManager.IntentComparator, ShadowPackageManager.PackageSetting
resources
Constructor | Description |
---|---|
ShadowApplicationPackageManager() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCrossProfileIntentFilter(IntentFilter filter,
int sourceUserId,
int targetUserId,
int flags) |
|
protected void |
addOnPermissionsChangeListener(Object listener) |
|
protected void |
addPackageToPreferred(String packageName) |
|
protected boolean |
addPermission(PermissionInfo info) |
|
protected boolean |
addPermissionAsync(PermissionInfo info) |
|
void |
addPreferredActivity(IntentFilter filter,
int match,
ComponentName[] set,
ComponentName activity) |
|
protected String[] |
canonicalToCurrentPackageNames(String[] names) |
|
protected boolean |
canRequestPackageInstalls() |
|
protected int |
checkPermission(String permName,
String pkgName) |
|
protected int |
checkSignatures(int uid1,
int uid2) |
|
protected int |
checkSignatures(String pkg1,
String pkg2) |
|
protected void |
clearApplicationUserData(String packageName,
IPackageDataObserver observer) |
|
protected void |
clearCrossProfileIntentFilters(int sourceUserId) |
|
protected void |
clearPackagePreferredActivities(String packageName) |
|
protected String[] |
currentToCanonicalPackageNames(String[] names) |
|
protected void |
deleteApplicationCacheFiles(String packageName,
IPackageDataObserver observer) |
|
protected void |
deleteApplicationCacheFilesAsUser(String packageName,
int userId,
IPackageDataObserver observer) |
|
protected void |
deletePackage(String packageName,
IPackageDeleteObserver observer,
int flags) |
|
protected void |
deletePackageAsUser(String packageName,
IPackageDeleteObserver observer,
int flags,
int userId) |
|
protected void |
extendVerificationTimeout(int id,
int verificationCodeAtTimeout,
long millisecondsToDelay) |
|
protected void |
flushPackageRestrictionsAsUser(int userId) |
|
protected void |
freeStorage(String volumeUuid,
long freeStorageSize,
IntentSender pi) |
|
protected void |
freeStorageAndNotify(long freeStorageSize,
IPackageDataObserver observer) |
|
protected void |
freeStorageAndNotify(String volumeUuid,
long freeStorageSize,
IPackageDataObserver observer) |
|
protected Drawable |
getActivityIcon(ComponentName activityName) |
|
protected ActivityInfo |
getActivityInfo(ComponentName component,
int flags) |
|
protected List<IntentFilter> |
getAllIntentFilters(String packageName) |
|
protected List<PermissionGroupInfo> |
getAllPermissionGroups(int flags) |
|
protected int |
getApplicationEnabledSetting(String packageName) |
|
protected boolean |
getApplicationHiddenSettingAsUser(String packageName,
UserHandle user) |
|
protected Drawable |
getApplicationIcon(ApplicationInfo info) |
|
protected Drawable |
getApplicationIcon(String packageName) |
|
protected ApplicationInfo |
getApplicationInfo(String packageName,
int flags) |
|
protected Object |
getChangedPackages(int sequenceNumber) |
|
protected int |
getComponentEnabledSetting(ComponentName componentName) |
|
protected Drawable |
getDefaultActivityIcon() |
|
protected String |
getDefaultBrowserPackageNameAsUser(int userId) |
|
protected Drawable |
getDrawable(String packageName,
int resId,
ApplicationInfo appInfo) |
|
protected ComponentName |
getHomeActivities(List<ResolveInfo> outActivities) |
|
protected List<ApplicationInfo> |
getInstalledApplications(int flags) |
|
protected List<ModuleInfo> |
getInstalledModules(int flags) |
|
List<PackageInfo> |
getInstalledPackages(int flags) |
|
protected List<PackageInfo> |
getInstalledPackagesAsUser(int flags,
int userId) |
|
protected String |
getInstallerPackageName(String packageName) |
|
protected InstrumentationInfo |
getInstrumentationInfo(ComponentName className,
int flags) |
|
protected List<IntentFilterVerificationInfo> |
getIntentFilterVerifications(String packageName) |
|
protected int |
getIntentVerificationStatusAsUser(String packageName,
int userId) |
|
protected Object |
getKeySetByAlias(String packageName,
String alias) |
|
protected Intent |
getLaunchIntentForPackage(String packageName) |
|
protected Intent |
getLeanbackLaunchIntentForPackage(String packageName) |
|
protected Object |
getModuleInfo(String packageName,
int flags) |
|
protected int |
getMoveStatus(int moveId) |
|
protected String |
getNameForUid(int uid) |
|
protected List<VolumeInfo> |
getPackageCandidateVolumes(ApplicationInfo app) |
|
protected Object |
getPackageCurrentVolume(Object app) |
|
protected int[] |
getPackageGids(String packageName) |
|
protected int[] |
getPackageGids(String packageName,
int flags) |
|
protected PackageInfo |
getPackageInfo(String packageName,
int flags) |
|
protected PackageInfo |
getPackageInfoAsUser(String packageName,
int flags,
int userId) |
|
protected String[] |
getPackagesForUid(int uid) |
|
protected List<PackageInfo> |
getPackagesHoldingPermissions(String[] permissions,
int flags) |
|
protected void |
getPackageSizeInfo(Object pkgName,
Object observer) |
|
protected void |
getPackageSizeInfo(Object pkgName,
Object uid,
Object observer) |
|
protected void |
getPackageSizeInfoAsUser(Object pkgName,
Object uid,
Object observer) |
|
protected int |
getPackageUid(String packageName,
int flags) |
|
protected int |
getPackageUidAsUser(String packageName,
int userId) |
|
protected int |
getPackageUidAsUser(String packageName,
int flags,
int userId) |
|
protected String |
getPermissionControllerPackageName() |
|
protected int |
getPermissionFlags(String permissionName,
String packageName,
UserHandle user) |
|
protected PermissionGroupInfo |
getPermissionGroupInfo(String name,
int flags) |
|
protected PermissionInfo |
getPermissionInfo(String name,
int flags) |
|
int |
getPreferredActivities(List<IntentFilter> outFilters,
List<ComponentName> outActivities,
String packageName) |
|
protected List<PackageInfo> |
getPreferredPackages(int flags) |
|
protected List<VolumeInfo> |
getPrimaryStorageCandidateVolumes() |
|
protected Object |
getPrimaryStorageCurrentVolume() |
|
protected ProviderInfo |
getProviderInfo(ComponentName component,
int flags) |
|
protected ActivityInfo |
getReceiverInfo(ComponentName component,
int flags) |
|
protected Resources |
getResourcesForActivity(ComponentName activityName) |
|
protected Resources |
getResourcesForApplication(ApplicationInfo applicationInfo) |
|
protected Resources |
getResourcesForApplication(String appPackageName) |
|
protected Resources |
getResourcesForApplicationAsUser(String appPackageName,
int userId) |
|
protected ServiceInfo |
getServiceInfo(ComponentName component,
int flags) |
|
protected String |
getServicesSystemSharedLibraryPackageName() |
|
protected String |
getSharedSystemSharedLibraryPackageName() |
|
protected Object |
getSigningKeySet(String packageName) |
|
protected FeatureInfo[] |
getSystemAvailableFeatures() |
|
protected String[] |
getSystemSharedLibraryNames() |
Returns all the values added via
ShadowPackageManager.addSystemSharedLibraryName(String) . |
String |
getSystemTextClassifierPackageName() |
|
protected int |
getUidForSharedUser(String sharedUserName) |
|
protected String[] |
getUnsuspendablePackages(String[] packageNames) |
|
protected Drawable |
getUserBadgedIcon(Drawable icon,
UserHandle user) |
Adds a profile badge to the icon.
|
protected Drawable |
getUserBadgeForDensity(UserHandle userHandle,
int i) |
|
protected VerifierDeviceIdentity |
getVerifierDeviceIdentity() |
|
protected void |
grantRuntimePermission(String packageName,
String permissionName,
UserHandle user) |
|
protected boolean |
hasSystemFeature(String name) |
|
protected boolean |
hasSystemFeature(String name,
int version) |
|
protected int |
installExistingPackage(String packageName) |
|
protected int |
installExistingPackageAsUser(String packageName,
int userId) |
|
protected void |
installPackage(Object packageURI,
Object observer,
Object flags,
Object installerPackageName) |
|
protected boolean |
isInstantApp(String packageName) |
|
protected boolean |
isPackageAvailable(String packageName) |
|
protected boolean |
isPackageSuspended(String packageName) |
|
protected boolean |
isPackageSuspendedForUser(String packageName,
int userId) |
|
protected boolean |
isPermissionRevokedByPolicy(String permName,
String pkgName) |
|
protected boolean |
isSafeMode() |
|
protected boolean |
isSignedBy(String packageName,
Object ks) |
|
protected boolean |
isSignedByExactly(String packageName,
Object ks) |
|
protected boolean |
isUpgrade() |
|
protected Drawable |
loadUnbadgedItemIcon(PackageItemInfo itemInfo,
ApplicationInfo appInfo) |
Gets the unbadged icon based on the values set by
ShadowPackageManager.setUnbadgedApplicationIcon(java.lang.String, android.graphics.drawable.Drawable) or returns null if nothing has been set. |
protected Object |
movePackage(Object packageName,
Object vol) |
|
protected Object |
movePrimaryStorage(Object vol) |
|
protected List<ResolveInfo> |
queryBroadcastReceivers(Intent intent,
int flags) |
|
protected List<ResolveInfo> |
queryBroadcastReceiversAsUser(Intent intent,
int flags,
int userId) |
|
protected List<ProviderInfo> |
queryContentProviders(String processName,
int uid,
int flags) |
|
protected List<InstrumentationInfo> |
queryInstrumentation(String targetPackage,
int flags) |
|
protected List<ResolveInfo> |
queryIntentActivities(Intent intent,
int flags) |
|
protected List<ResolveInfo> |
queryIntentActivitiesAsUser(Intent intent,
int flags,
int userId) |
Behaves as
queryIntentActivities(Intent, int) and currently ignores userId. |
protected List<ResolveInfo> |
queryIntentActivityOptions(ComponentName caller,
Intent[] specifics,
Intent intent,
int flags) |
|
protected List<ResolveInfo> |
queryIntentContentProviders(Intent intent,
int flags) |
|
protected List<ResolveInfo> |
queryIntentContentProvidersAsUser(Intent intent,
int flags,
int userId) |
|
protected List<ResolveInfo> |
queryIntentServices(Intent intent,
int flags) |
|
protected List<ResolveInfo> |
queryIntentServicesAsUser(Intent intent,
int flags,
int userId) |
Behaves as
queryIntentServices(Intent, int) and currently ignores userId. |
protected List<PermissionInfo> |
queryPermissionsByGroup(String group,
int flags) |
|
protected void |
registerMoveCallback(Object callback,
Object handler) |
|
protected void |
removeOnPermissionsChangeListener(Object listener) |
|
protected void |
removePackageFromPreferred(String packageName) |
|
protected void |
removePermission(String name) |
|
protected void |
replacePreferredActivity(IntentFilter filter,
int match,
ComponentName[] set,
ComponentName activity) |
|
protected ResolveInfo |
resolveActivity(Intent intent,
int flags) |
|
protected ResolveInfo |
resolveActivityAsUser(Intent intent,
int flags,
int userId) |
Behaves as
resolveActivity(Intent, int) and currently ignores userId. |
protected ProviderInfo |
resolveContentProvider(String name,
int flags) |
|
protected ProviderInfo |
resolveContentProviderAsUser(String name,
int flags,
int userId) |
|
protected ResolveInfo |
resolveService(Intent intent,
int flags) |
|
protected void |
revokeRuntimePermission(String packageName,
String permissionName,
UserHandle user) |
|
protected void |
setApplicationEnabledSetting(String packageName,
int newState,
int flags) |
|
protected boolean |
setApplicationHiddenSettingAsUser(String packageName,
boolean hidden,
UserHandle user) |
|
protected void |
setComponentEnabledSetting(ComponentName componentName,
int newState,
int flags) |
|
protected boolean |
setDefaultBrowserPackageNameAsUser(String packageName,
int userId) |
|
protected String[] |
setDistractingPackageRestrictions(String[] packages,
int restrictionFlags) |
|
protected void |
setInstallerPackageName(String targetPackage,
String installerPackageName) |
|
protected Object |
setPackagesSuspended(Object packageNames,
Object suspended,
Object appExtras,
Object launcherExtras,
Object dialogInfo) |
|
protected String[] |
setPackagesSuspended(String[] packageNames,
boolean suspended,
PersistableBundle appExtras,
PersistableBundle launcherExtras,
String dialogMessage) |
|
protected String[] |
setPackagesSuspendedAsUser(String[] packageNames,
boolean suspended,
int userId) |
|
protected boolean |
shouldShowRequestPermissionRationale(String permission) |
|
protected void |
unregisterMoveCallback(Object callback) |
|
protected boolean |
updateIntentVerificationStatusAsUser(String packageName,
int status,
int userId) |
|
protected void |
updatePermissionFlags(String permissionName,
String packageName,
int flagMask,
int flagValues,
UserHandle user) |
|
protected void |
verifyIntentFilter(int id,
int verificationCode,
List<String> failedDomains) |
|
protected void |
verifyPendingInstall(int id,
int verificationCode) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addActivityIcon, addActivityIcon, addActivityIfNotPresent, addCanonicalName, addChangedPackage, addCurrentToCannonicalName, addDrawableResolution, addIntentFilterForActivity, addIntentFilterForProvider, addIntentFilterForReceiver, addIntentFilterForService, addOrUpdateActivity, addOrUpdateProvider, addOrUpdateReceiver, addOrUpdateService, addPackage, addPackage, addPackage, addPackageInternal, addPackageNoDefaults, addPermissionGroupInfo, addPermissionInfo, addPreferredActivityInternal, addProviderIfNotPresent, addReceiverIfNotPresent, addResolveInfoForIntent, addResolveInfoForIntent, addResolveInfoForIntentNoDefaults, addServiceIfNotPresent, addSystemAvailableFeature, addSystemSharedLibraryName, clearIntentFilterForActivity, clearIntentFilterForProvider, clearIntentFilterForReceiver, clearIntentFilterForService, clearPackagePreferredActivitiesInternal, clearSystemAvailableFeatures, clearSystemSharedLibraryNames, deleteModule, deletePackage, doPendingUninstallCallbacks, freeStorage, getComponentEnabledSettingFlags, getDeletedPackages, getDistractingPackageRestrictions, getIntentFiltersForActivity, getIntentFiltersForProvider, getIntentFiltersForReceiver, getIntentFiltersForService, getInternalMutablePackageInfo, getPackageArchiveInfo, getPackageInfoForTesting, getPackageSetting, getPersistentPreferredActivities, getPreferredActivitiesInternal, getVerificationExtendedTimeout, getVerificationResult, installModule, installPackage, mapForPackage, queryBroadcastReceivers, queryBroadcastReceiversAsUser, queryOverriddenIntents, removeActivity, removePackage, removeProvider, removeReceiver, removeResolveInfosForIntent, removeService, reset, setApplicationIcon, setCanRequestPackageInstalls, setNameForUid, setPackageArchiveInfo, setPackagesForCallingUid, setPackagesForUid, setResolveInfosForIntent, setSafeMode, setShouldShowActivityChooser, setShouldShowRequestPermissionRationale, setSystemFeature, setUnbadgedApplicationIcon
@Implementation public List<PackageInfo> getInstalledPackages(int flags)
@Implementation(minSdk=29) protected List<ModuleInfo> getInstalledModules(int flags)
@Implementation(minSdk=29) protected Object getModuleInfo(String packageName, int flags) throws PackageManager.NameNotFoundException
@Implementation protected ActivityInfo getActivityInfo(ComponentName component, int flags) throws PackageManager.NameNotFoundException
@Implementation protected boolean hasSystemFeature(String name)
@Implementation protected int getComponentEnabledSetting(ComponentName componentName)
@Implementation protected String getNameForUid(int uid)
@Implementation protected String[] getPackagesForUid(int uid)
getPackagesForUid
in class ShadowPackageManager
@Implementation protected int getApplicationEnabledSetting(String packageName)
@Implementation protected ProviderInfo getProviderInfo(ComponentName component, int flags) throws PackageManager.NameNotFoundException
@Implementation protected void setComponentEnabledSetting(ComponentName componentName, int newState, int flags)
@Implementation protected void setApplicationEnabledSetting(String packageName, int newState, int flags)
@Implementation protected ResolveInfo resolveActivity(Intent intent, int flags)
@Implementation protected ProviderInfo resolveContentProvider(String name, int flags)
@Implementation(minSdk=21) protected ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId)
@Implementation protected PackageInfo getPackageInfo(String packageName, int flags) throws PackageManager.NameNotFoundException
@Implementation protected List<ResolveInfo> queryIntentServices(Intent intent, int flags)
@Implementation(minSdk=17) protected List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId)
queryIntentServices(Intent, int)
and currently ignores userId.@Implementation protected List<ResolveInfo> queryIntentActivities(Intent intent, int flags)
@Implementation(minSdk=17) protected List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, int flags, int userId)
queryIntentActivities(Intent, int)
and currently ignores userId.@Implementation protected int checkPermission(String permName, String pkgName)
@Implementation protected ActivityInfo getReceiverInfo(ComponentName component, int flags) throws PackageManager.NameNotFoundException
@Implementation protected List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags)
@Implementation protected ResolveInfo resolveService(Intent intent, int flags)
@Implementation protected ServiceInfo getServiceInfo(ComponentName component, int flags) throws PackageManager.NameNotFoundException
@Implementation protected Resources getResourcesForApplication(ApplicationInfo applicationInfo) throws PackageManager.NameNotFoundException
@Implementation protected List<ApplicationInfo> getInstalledApplications(int flags)
@Implementation protected String getInstallerPackageName(String packageName)
@Implementation protected PermissionInfo getPermissionInfo(String name, int flags) throws PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected boolean shouldShowRequestPermissionRationale(String permission)
@Implementation protected FeatureInfo[] getSystemAvailableFeatures()
@Implementation protected void verifyPendingInstall(int id, int verificationCode)
@Implementation(minSdk=17) protected void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay)
@Implementation(maxSdk=22) protected void freeStorageAndNotify(long freeStorageSize, IPackageDataObserver observer)
freeStorageAndNotify
in class ShadowPackageManager
@Implementation(minSdk=23) protected void freeStorageAndNotify(String volumeUuid, long freeStorageSize, IPackageDataObserver observer)
@Implementation protected void setInstallerPackageName(String targetPackage, String installerPackageName)
@Implementation(minSdk=19) protected List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags)
@Implementation(minSdk=19) protected List<ResolveInfo> queryIntentContentProvidersAsUser(Intent intent, int flags, int userId)
@Implementation(minSdk=23) protected String getPermissionControllerPackageName()
@Implementation(maxSdk=16) protected void getPackageSizeInfo(Object pkgName, Object observer)
@Implementation(minSdk=17, maxSdk=23) protected void getPackageSizeInfo(Object pkgName, Object uid, Object observer)
@Implementation(minSdk=24) protected void getPackageSizeInfoAsUser(Object pkgName, Object uid, Object observer)
@Implementation protected void deletePackage(String packageName, IPackageDeleteObserver observer, int flags)
deletePackage
in class ShadowPackageManager
@Implementation protected String[] currentToCanonicalPackageNames(String[] names)
@Implementation protected String[] canonicalToCurrentPackageNames(String[] names)
@Implementation protected boolean isSafeMode()
@Implementation protected Drawable getApplicationIcon(String packageName) throws PackageManager.NameNotFoundException
@Implementation protected Drawable getApplicationIcon(ApplicationInfo info) throws PackageManager.NameNotFoundException
@Implementation(minSdk=21) protected Drawable getUserBadgeForDensity(UserHandle userHandle, int i)
@Implementation protected int checkSignatures(String pkg1, String pkg2)
@Implementation protected int checkSignatures(int uid1, int uid2)
@Implementation protected List<PermissionInfo> queryPermissionsByGroup(String group, int flags) throws PackageManager.NameNotFoundException
@Implementation protected Intent getLaunchIntentForPackage(String packageName)
@Implementation(minSdk=21) protected Intent getLeanbackLaunchIntentForPackage(String packageName)
@Implementation(minSdk=24) protected PackageInfo getPackageInfoAsUser(String packageName, int flags, int userId) throws PackageManager.NameNotFoundException
@Implementation protected int[] getPackageGids(String packageName) throws PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int[] getPackageGids(String packageName, int flags) throws PackageManager.NameNotFoundException
@Implementation(minSdk=18) protected int getPackageUid(String packageName, int flags) throws PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int getPackageUidAsUser(String packageName, int userId) throws PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int getPackageUidAsUser(String packageName, int flags, int userId) throws PackageManager.NameNotFoundException
@Implementation protected PermissionGroupInfo getPermissionGroupInfo(String name, int flags) throws PackageManager.NameNotFoundException
@Implementation protected List<PermissionGroupInfo> getAllPermissionGroups(int flags)
@Implementation protected ApplicationInfo getApplicationInfo(String packageName, int flags) throws PackageManager.NameNotFoundException
@Implementation protected String[] getSystemSharedLibraryNames()
ShadowPackageManager.addSystemSharedLibraryName(String)
.@Implementation(minSdk=24) protected String getServicesSystemSharedLibraryPackageName()
@Implementation(minSdk=24) protected String getSharedSystemSharedLibraryPackageName()
@Implementation(minSdk=24) protected boolean hasSystemFeature(String name, int version)
@Implementation(minSdk=23) protected boolean isPermissionRevokedByPolicy(String permName, String pkgName)
@Implementation protected boolean addPermission(PermissionInfo info)
@Implementation protected boolean addPermissionAsync(PermissionInfo info)
@Implementation protected void removePermission(String name)
@Implementation(minSdk=23) protected void grantRuntimePermission(String packageName, String permissionName, UserHandle user)
@Implementation(minSdk=23) protected void revokeRuntimePermission(String packageName, String permissionName, UserHandle user)
@Implementation(minSdk=23) protected int getPermissionFlags(String permissionName, String packageName, UserHandle user)
@Implementation(minSdk=23) protected void updatePermissionFlags(String permissionName, String packageName, int flagMask, int flagValues, UserHandle user)
@Implementation protected int getUidForSharedUser(String sharedUserName) throws PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected List<PackageInfo> getInstalledPackagesAsUser(int flags, int userId)
@Implementation(minSdk=18) protected List<PackageInfo> getPackagesHoldingPermissions(String[] permissions, int flags)
@Implementation(minSdk=17) protected ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId)
resolveActivity(Intent, int)
and currently ignores userId.@Implementation protected List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, Intent[] specifics, Intent intent, int flags)
@Implementation(minSdk=24) protected List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent, int flags, int userId)
@Implementation protected List<ProviderInfo> queryContentProviders(String processName, int uid, int flags)
@Implementation protected InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags) throws PackageManager.NameNotFoundException
@Implementation protected List<InstrumentationInfo> queryInstrumentation(String targetPackage, int flags)
@Implementation protected Drawable getDrawable(String packageName, @DrawableRes int resId, ApplicationInfo appInfo)
@Implementation protected Drawable getActivityIcon(ComponentName activityName) throws PackageManager.NameNotFoundException
@Implementation protected Drawable getDefaultActivityIcon()
@Implementation protected Resources getResourcesForActivity(ComponentName activityName) throws PackageManager.NameNotFoundException
@Implementation protected Resources getResourcesForApplication(String appPackageName) throws PackageManager.NameNotFoundException
@Implementation(minSdk=17) protected Resources getResourcesForApplicationAsUser(String appPackageName, int userId) throws PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected void addOnPermissionsChangeListener(Object listener)
@Implementation(minSdk=23) protected void removeOnPermissionsChangeListener(Object listener)
@Implementation(maxSdk=27) protected void installPackage(Object packageURI, Object observer, Object flags, Object installerPackageName)
@Implementation(minSdk=17) protected int installExistingPackage(String packageName) throws PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int installExistingPackageAsUser(String packageName, int userId) throws PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected void verifyIntentFilter(int id, int verificationCode, List<String> failedDomains)
@Implementation(minSdk=24) protected int getIntentVerificationStatusAsUser(String packageName, int userId)
@Implementation(minSdk=24) protected boolean updateIntentVerificationStatusAsUser(String packageName, int status, int userId)
@Implementation(minSdk=23) protected List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName)
@Implementation(minSdk=23) protected List<IntentFilter> getAllIntentFilters(String packageName)
@Implementation(minSdk=24) protected String getDefaultBrowserPackageNameAsUser(int userId)
@Implementation(minSdk=24) protected boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId)
@Implementation(minSdk=23) protected int getMoveStatus(int moveId)
@Implementation(minSdk=23) protected void registerMoveCallback(Object callback, Object handler)
@Implementation(minSdk=23) protected void unregisterMoveCallback(Object callback)
@Implementation(minSdk=23) protected Object movePackage(Object packageName, Object vol)
@Implementation(minSdk=23) protected Object getPackageCurrentVolume(Object app)
@Implementation(minSdk=23) protected List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app)
@Implementation(minSdk=23) protected Object movePrimaryStorage(Object vol)
@Implementation(minSdk=23) protected Object getPrimaryStorageCurrentVolume()
@Implementation(minSdk=23) protected List<VolumeInfo> getPrimaryStorageCandidateVolumes()
@Implementation(minSdk=24) protected void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags, int userId)
@Implementation protected void clearApplicationUserData(String packageName, IPackageDataObserver observer)
@Implementation protected void deleteApplicationCacheFiles(String packageName, IPackageDataObserver observer)
@Implementation(minSdk=24) protected void deleteApplicationCacheFilesAsUser(String packageName, int userId, IPackageDataObserver observer)
@Implementation(minSdk=23) protected void freeStorage(String volumeUuid, long freeStorageSize, IntentSender pi)
@Implementation(minSdk=24, maxSdk=27) protected String[] setPackagesSuspendedAsUser(String[] packageNames, boolean suspended, int userId)
@Implementation(minSdk=24) protected boolean isPackageSuspendedForUser(String packageName, int userId)
@Implementation protected void addPackageToPreferred(String packageName)
@Implementation protected void removePackageFromPreferred(String packageName)
@Implementation protected List<PackageInfo> getPreferredPackages(int flags)
@Implementation public void addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)
@Implementation protected void replacePreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)
@Implementation public int getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName)
@Implementation protected void clearPackagePreferredActivities(String packageName)
@Implementation(minSdk=19) protected ComponentName getHomeActivities(List<ResolveInfo> outActivities)
@Implementation(minSdk=24) protected void flushPackageRestrictionsAsUser(int userId)
@Implementation(minSdk=21) protected boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, UserHandle user)
@Implementation(minSdk=21) protected boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user)
@Implementation(minSdk=21) protected Object getKeySetByAlias(String packageName, String alias)
@Implementation(minSdk=21) protected Object getSigningKeySet(String packageName)
@Implementation(minSdk=21) protected boolean isSignedBy(String packageName, Object ks)
@Implementation(minSdk=21) protected boolean isSignedByExactly(String packageName, Object ks)
@Implementation protected VerifierDeviceIdentity getVerifierDeviceIdentity()
@Implementation(minSdk=22) protected boolean isUpgrade()
@Implementation(minSdk=21) protected boolean isPackageAvailable(String packageName)
@Implementation(minSdk=21) protected void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, int flags)
@Implementation(minSdk=21) protected void clearCrossProfileIntentFilters(int sourceUserId)
@Implementation(minSdk=22) protected Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo)
ShadowPackageManager.setUnbadgedApplicationIcon(java.lang.String, android.graphics.drawable.Drawable)
or returns null if nothing has been set.@Implementation(minSdk=21) protected Drawable getUserBadgedIcon(Drawable icon, UserHandle user)
@Implementation(minSdk=26) protected boolean canRequestPackageInstalls()
@Implementation(minSdk=26) protected Object getChangedPackages(int sequenceNumber)
@Implementation(minSdk=28) public String getSystemTextClassifierPackageName()
@Implementation(minSdk=28) @HiddenApi protected String[] setPackagesSuspended(String[] packageNames, boolean suspended, PersistableBundle appExtras, PersistableBundle launcherExtras, String dialogMessage)
@Implementation(minSdk=29) @HiddenApi protected Object setPackagesSuspended(Object packageNames, Object suspended, Object appExtras, Object launcherExtras, Object dialogInfo)
@HiddenApi @Implementation(minSdk=29) protected String[] getUnsuspendablePackages(String[] packageNames)
@HiddenApi @Implementation(minSdk=28) protected boolean isPackageSuspended(String packageName) throws PackageManager.NameNotFoundException
@Implementation(minSdk=26) protected boolean isInstantApp(String packageName)
@HiddenApi @Implementation(minSdk=29) protected String[] setDistractingPackageRestrictions(String[] packages, int restrictionFlags)