@Implements(value=android.app.ApplicationPackageManager.class, isInAndroidSdk=false, looseSignatures=true) public class ShadowApplicationPackageManager extends ShadowPackageManager
ShadowPackageManager.ComponentState, ShadowPackageManager.IntentComparator, ShadowPackageManager.IntentFilterWrapper, ShadowPackageManager.PackageSetting
resources
Constructor and Description |
---|
ShadowApplicationPackageManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
__constructor__(java.lang.Object contextImpl,
java.lang.Object pm) |
protected void |
addCrossProfileIntentFilter(android.content.IntentFilter filter,
int sourceUserId,
int targetUserId,
int flags) |
protected void |
addOnPermissionsChangeListener(java.lang.Object listener) |
protected void |
addPackageToPreferred(java.lang.String packageName) |
protected boolean |
addPermission(android.content.pm.PermissionInfo info) |
protected boolean |
addPermissionAsync(android.content.pm.PermissionInfo info) |
void |
addPreferredActivity(android.content.IntentFilter filter,
int match,
android.content.ComponentName[] set,
android.content.ComponentName activity) |
protected java.lang.String[] |
canonicalToCurrentPackageNames(java.lang.String[] names) |
protected boolean |
canRequestPackageInstalls() |
protected int |
checkPermission(java.lang.String permName,
java.lang.String pkgName) |
protected int |
checkSignatures(int uid1,
int uid2) |
protected int |
checkSignatures(java.lang.String pkg1,
java.lang.String pkg2) |
protected void |
clearApplicationUserData(java.lang.String packageName,
android.content.pm.IPackageDataObserver observer) |
protected void |
clearCrossProfileIntentFilters(int sourceUserId) |
protected void |
clearPackagePreferredActivities(java.lang.String packageName) |
protected java.lang.String[] |
currentToCanonicalPackageNames(java.lang.String[] names) |
protected void |
deleteApplicationCacheFiles(java.lang.String packageName,
android.content.pm.IPackageDataObserver observer) |
protected void |
deleteApplicationCacheFilesAsUser(java.lang.String packageName,
int userId,
android.content.pm.IPackageDataObserver observer) |
protected void |
deletePackage(java.lang.String packageName,
android.content.pm.IPackageDeleteObserver observer,
int flags) |
protected void |
deletePackageAsUser(java.lang.String packageName,
android.content.pm.IPackageDeleteObserver observer,
int flags,
int userId) |
protected void |
extendVerificationTimeout(int id,
int verificationCodeAtTimeout,
long millisecondsToDelay) |
protected void |
flushPackageRestrictionsAsUser(int userId) |
protected void |
freeStorage(java.lang.String volumeUuid,
long freeStorageSize,
android.content.IntentSender pi) |
protected void |
freeStorageAndNotify(long freeStorageSize,
android.content.pm.IPackageDataObserver observer) |
protected void |
freeStorageAndNotify(java.lang.String volumeUuid,
long freeStorageSize,
android.content.pm.IPackageDataObserver observer) |
protected android.graphics.drawable.Drawable |
getActivityBanner(android.content.ComponentName activityName) |
protected android.graphics.drawable.Drawable |
getActivityBanner(android.content.Intent intent) |
protected android.graphics.drawable.Drawable |
getActivityIcon(android.content.ComponentName activityName) |
protected android.content.pm.ActivityInfo |
getActivityInfo(android.content.ComponentName component,
int flags) |
protected android.graphics.drawable.Drawable |
getActivityLogo(android.content.ComponentName activityName) |
protected android.graphics.drawable.Drawable |
getActivityLogo(android.content.Intent intent) |
protected java.util.List<android.content.IntentFilter> |
getAllIntentFilters(java.lang.String packageName) |
protected java.util.List<android.content.pm.PermissionGroupInfo> |
getAllPermissionGroups(int flags) |
protected android.graphics.drawable.Drawable |
getApplicationBanner(android.content.pm.ApplicationInfo info) |
protected android.graphics.drawable.Drawable |
getApplicationBanner(java.lang.String packageName) |
protected int |
getApplicationEnabledSetting(java.lang.String packageName) |
protected boolean |
getApplicationHiddenSettingAsUser(java.lang.String packageName,
android.os.UserHandle user) |
protected android.graphics.drawable.Drawable |
getApplicationIcon(android.content.pm.ApplicationInfo info) |
protected android.graphics.drawable.Drawable |
getApplicationIcon(java.lang.String packageName) |
protected android.content.pm.ApplicationInfo |
getApplicationInfo(java.lang.String packageName,
int flags) |
protected android.graphics.drawable.Drawable |
getApplicationLogo(android.content.pm.ApplicationInfo info) |
protected android.graphics.drawable.Drawable |
getApplicationLogo(java.lang.String packageName) |
protected java.lang.Object |
getChangedPackages(int sequenceNumber) |
protected int |
getComponentEnabledSetting(android.content.ComponentName componentName) |
protected android.graphics.drawable.Drawable |
getDefaultActivityIcon() |
protected java.lang.String |
getDefaultBrowserPackageNameAsUser(int userId) |
protected android.graphics.drawable.Drawable |
getDrawable(java.lang.String packageName,
int resId,
android.content.pm.ApplicationInfo appInfo) |
protected android.content.ComponentName |
getHomeActivities(java.util.List<android.content.pm.ResolveInfo> outActivities) |
protected java.util.List<android.content.pm.ApplicationInfo> |
getInstalledApplications(int flags) |
java.util.List<android.content.pm.PackageInfo> |
getInstalledPackages(int flags) |
protected java.util.List<android.content.pm.PackageInfo> |
getInstalledPackagesAsUser(int flags,
int userId) |
protected java.lang.String |
getInstallerPackageName(java.lang.String packageName) |
protected android.content.pm.InstrumentationInfo |
getInstrumentationInfo(android.content.ComponentName className,
int flags) |
protected java.util.List<android.content.pm.IntentFilterVerificationInfo> |
getIntentFilterVerifications(java.lang.String packageName) |
protected int |
getIntentVerificationStatusAsUser(java.lang.String packageName,
int userId) |
protected java.lang.Object |
getKeySetByAlias(java.lang.String packageName,
java.lang.String alias) |
protected android.content.Intent |
getLaunchIntentForPackage(java.lang.String packageName) |
protected int |
getMoveStatus(int moveId) |
protected java.lang.String |
getNameForUid(int uid) |
protected java.util.List<android.os.storage.VolumeInfo> |
getPackageCandidateVolumes(android.content.pm.ApplicationInfo app) |
protected java.lang.Object |
getPackageCurrentVolume(java.lang.Object app) |
protected int[] |
getPackageGids(java.lang.String packageName) |
protected int[] |
getPackageGids(java.lang.String packageName,
int flags) |
protected android.content.pm.PackageInfo |
getPackageInfo(java.lang.String packageName,
int flags) |
protected android.content.pm.PackageInfo |
getPackageInfoAsUser(java.lang.String packageName,
int flags,
int userId) |
protected java.lang.String[] |
getPackagesForUid(int uid) |
protected java.util.List<android.content.pm.PackageInfo> |
getPackagesHoldingPermissions(java.lang.String[] permissions,
int flags) |
protected void |
getPackageSizeInfo(java.lang.Object pkgName,
java.lang.Object observer) |
protected void |
getPackageSizeInfo(java.lang.Object pkgName,
java.lang.Object uid,
java.lang.Object observer) |
protected void |
getPackageSizeInfoAsUser(java.lang.Object pkgName,
java.lang.Object uid,
java.lang.Object observer) |
protected int |
getPackageUid(java.lang.String packageName,
int flags) |
protected int |
getPackageUidAsUser(java.lang.String packageName,
int userId) |
protected int |
getPackageUidAsUser(java.lang.String packageName,
int flags,
int userId) |
protected java.lang.String |
getPermissionControllerPackageName() |
protected int |
getPermissionFlags(java.lang.String permissionName,
java.lang.String packageName,
android.os.UserHandle user) |
protected android.content.pm.PermissionGroupInfo |
getPermissionGroupInfo(java.lang.String name,
int flags) |
protected android.content.pm.PermissionInfo |
getPermissionInfo(java.lang.String name,
int flags) |
int |
getPreferredActivities(java.util.List<android.content.IntentFilter> outFilters,
java.util.List<android.content.ComponentName> outActivities,
java.lang.String packageName) |
protected java.util.List<android.content.pm.PackageInfo> |
getPreferredPackages(int flags) |
protected java.util.List<android.os.storage.VolumeInfo> |
getPrimaryStorageCandidateVolumes() |
protected java.lang.Object |
getPrimaryStorageCurrentVolume() |
protected android.content.pm.ProviderInfo |
getProviderInfo(android.content.ComponentName component,
int flags) |
protected android.content.pm.ActivityInfo |
getReceiverInfo(android.content.ComponentName className,
int flags) |
protected android.content.res.Resources |
getResourcesForActivity(android.content.ComponentName activityName) |
protected android.content.res.Resources |
getResourcesForApplication(android.content.pm.ApplicationInfo applicationInfo) |
protected android.content.res.Resources |
getResourcesForApplication(java.lang.String appPackageName) |
protected android.content.res.Resources |
getResourcesForApplicationAsUser(java.lang.String appPackageName,
int userId) |
protected android.content.pm.ServiceInfo |
getServiceInfo(android.content.ComponentName className,
int flags) |
protected java.lang.String |
getServicesSystemSharedLibraryPackageName() |
protected java.lang.String |
getSharedSystemSharedLibraryPackageName() |
protected java.lang.Object |
getSigningKeySet(java.lang.String packageName) |
protected android.content.pm.FeatureInfo[] |
getSystemAvailableFeatures() |
protected java.lang.String[] |
getSystemSharedLibraryNames()
Returns all the values added via
ShadowPackageManager.addSystemSharedLibraryName(String) . |
java.lang.String |
getSystemTextClassifierPackageName() |
protected int |
getUidForSharedUser(java.lang.String sharedUserName) |
protected android.graphics.drawable.Drawable |
getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable drawable,
android.os.UserHandle user,
android.graphics.Rect badgeLocation,
int badgeDensity) |
protected android.graphics.drawable.Drawable |
getUserBadgedIcon(android.graphics.drawable.Drawable icon,
android.os.UserHandle user) |
protected java.lang.CharSequence |
getUserBadgedLabel(java.lang.CharSequence label,
android.os.UserHandle user) |
protected android.graphics.drawable.Drawable |
getUserBadgeForDensity(android.os.UserHandle userHandle,
int i) |
protected android.graphics.drawable.Drawable |
getUserBadgeForDensityNoBackground(android.os.UserHandle user,
int density) |
protected android.content.pm.VerifierDeviceIdentity |
getVerifierDeviceIdentity() |
protected void |
grantRuntimePermission(java.lang.String packageName,
java.lang.String permissionName,
android.os.UserHandle user) |
protected boolean |
hasSystemFeature(java.lang.String name) |
protected boolean |
hasSystemFeature(java.lang.String name,
int version) |
protected int |
installExistingPackage(java.lang.String packageName) |
protected int |
installExistingPackageAsUser(java.lang.String packageName,
int userId) |
protected void |
installPackage(java.lang.Object packageURI,
java.lang.Object observer,
java.lang.Object flags,
java.lang.Object installerPackageName) |
protected boolean |
isPackageAvailable(java.lang.String packageName) |
protected boolean |
isPackageSuspended(java.lang.String packageName) |
protected boolean |
isPackageSuspendedForUser(java.lang.String packageName,
int userId) |
protected boolean |
isPermissionRevokedByPolicy(java.lang.String permName,
java.lang.String pkgName) |
protected boolean |
isSafeMode() |
protected boolean |
isSignedBy(java.lang.String packageName,
java.lang.Object ks) |
protected boolean |
isSignedByExactly(java.lang.String packageName,
java.lang.Object ks) |
protected boolean |
isUpgrade() |
protected android.graphics.drawable.Drawable |
loadItemIcon(android.content.pm.PackageItemInfo itemInfo,
android.content.pm.ApplicationInfo appInfo) |
protected android.graphics.drawable.Drawable |
loadUnbadgedItemIcon(android.content.pm.PackageItemInfo itemInfo,
android.content.pm.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 java.lang.Object |
movePackage(java.lang.Object packageName,
java.lang.Object vol) |
protected java.lang.Object |
movePrimaryStorage(java.lang.Object vol) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryBroadcastReceivers(android.content.Intent intent,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryBroadcastReceiversAsUser(android.content.Intent intent,
int flags,
int userId) |
protected java.util.List<android.content.pm.ProviderInfo> |
queryContentProviders(java.lang.String processName,
int uid,
int flags) |
protected java.util.List<android.content.pm.InstrumentationInfo> |
queryInstrumentation(java.lang.String targetPackage,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentActivities(android.content.Intent intent,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentActivitiesAsUser(android.content.Intent intent,
int flags,
int userId)
Behaves as
queryIntentActivities(Intent, int) and currently ignores userId. |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentActivityOptions(android.content.ComponentName caller,
android.content.Intent[] specifics,
android.content.Intent intent,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentContentProviders(android.content.Intent intent,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentContentProvidersAsUser(android.content.Intent intent,
int flags,
int userId) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentServices(android.content.Intent intent,
int flags) |
protected java.util.List<android.content.pm.ResolveInfo> |
queryIntentServicesAsUser(android.content.Intent intent,
int flags,
int userId)
Behaves as
queryIntentServices(Intent, int) and currently ignores userId. |
protected java.util.List<android.content.pm.PermissionInfo> |
queryPermissionsByGroup(java.lang.String group,
int flags) |
protected void |
registerMoveCallback(java.lang.Object callback,
java.lang.Object handler) |
protected void |
removeOnPermissionsChangeListener(java.lang.Object listener) |
protected void |
removePackageFromPreferred(java.lang.String packageName) |
protected void |
removePermission(java.lang.String name) |
protected void |
replacePreferredActivity(android.content.IntentFilter filter,
int match,
android.content.ComponentName[] set,
android.content.ComponentName activity) |
protected android.content.pm.ResolveInfo |
resolveActivity(android.content.Intent intent,
int flags) |
protected android.content.pm.ResolveInfo |
resolveActivityAsUser(android.content.Intent intent,
int flags,
int userId) |
protected android.content.pm.ProviderInfo |
resolveContentProvider(java.lang.String name,
int flags) |
protected android.content.pm.ProviderInfo |
resolveContentProviderAsUser(java.lang.String name,
int flags,
int userId) |
protected android.content.pm.ResolveInfo |
resolveService(android.content.Intent intent,
int flags) |
protected void |
revokeRuntimePermission(java.lang.String packageName,
java.lang.String permissionName,
android.os.UserHandle user) |
protected void |
setApplicationEnabledSetting(java.lang.String packageName,
int newState,
int flags) |
protected boolean |
setApplicationHiddenSettingAsUser(java.lang.String packageName,
boolean hidden,
android.os.UserHandle user) |
protected void |
setComponentEnabledSetting(android.content.ComponentName componentName,
int newState,
int flags) |
protected boolean |
setDefaultBrowserPackageNameAsUser(java.lang.String packageName,
int userId) |
protected void |
setInstallerPackageName(java.lang.String targetPackage,
java.lang.String installerPackageName) |
protected java.lang.String[] |
setPackagesSuspended(java.lang.String[] packageNames,
boolean suspended,
android.os.PersistableBundle appExtras,
android.os.PersistableBundle launcherExtras,
java.lang.String dialogMessage) |
protected java.lang.String[] |
setPackagesSuspendedAsUser(java.lang.String[] packageNames,
boolean suspended,
int userId) |
protected boolean |
shouldShowRequestPermissionRationale(java.lang.String permission) |
protected void |
unregisterMoveCallback(java.lang.Object callback) |
protected boolean |
updateIntentVerificationStatusAsUser(java.lang.String packageName,
int status,
int userId) |
protected void |
updatePermissionFlags(java.lang.String permissionName,
java.lang.String packageName,
int flagMask,
int flagValues,
android.os.UserHandle user) |
protected void |
verifyIntentFilter(int id,
int verificationCode,
java.util.List<java.lang.String> failedDomains) |
protected void |
verifyPendingInstall(int id,
int verificationCode) |
addActivityIcon, addActivityIcon, addChangedPackage, addCurrentToCannonicalName, addDrawableResolution, addPackage, addPackage, addPackage, addPackageInternal, addPermissionGroupInfo, addPermissionInfo, addResolveInfoForIntent, addResolveInfoForIntent, addSystemAvailableFeature, addSystemSharedLibraryName, clearSystemAvailableFeatures, clearSystemSharedLibraryNames, doPendingUninstallCallbacks, freeStorage, getComponentEnabledSettingFlags, getDeletedPackages, getIntentFiltersForActivity, getIntentFiltersForReceiver, getIntentFiltersForService, getPackageArchiveInfo, getPackageSetting, getVerificationExtendedTimeout, getVerificationResult, queryBroadcastReceivers, queryBroadcastReceiversAsUser, queryOverriddenIntents, removePackage, removeResolveInfosForIntent, reset, setApplicationIcon, setCanRequestPackageInstalls, setNameForUid, setPackageArchiveInfo, setPackagesForCallingUid, setPackagesForUid, setResolveInfosForIntent, setShouldShowRequestPermissionRationale, setSystemFeature, setUnbadgedApplicationIcon
@Implementation protected void __constructor__(java.lang.Object contextImpl, java.lang.Object pm)
@Implementation public java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int flags)
@Implementation protected android.content.pm.ActivityInfo getActivityInfo(android.content.ComponentName component, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected boolean hasSystemFeature(java.lang.String name)
@Implementation protected int getComponentEnabledSetting(android.content.ComponentName componentName)
@Implementation protected java.lang.String getNameForUid(int uid)
@Implementation protected java.lang.String[] getPackagesForUid(int uid)
@Implementation protected int getApplicationEnabledSetting(java.lang.String packageName)
@Implementation protected android.content.pm.ProviderInfo getProviderInfo(android.content.ComponentName component, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected void setComponentEnabledSetting(android.content.ComponentName componentName, int newState, int flags)
@Implementation protected void setApplicationEnabledSetting(java.lang.String packageName, int newState, int flags)
@Implementation protected android.content.pm.ResolveInfo resolveActivity(android.content.Intent intent, int flags)
@Implementation protected android.content.pm.ProviderInfo resolveContentProvider(java.lang.String name, int flags)
@Implementation(minSdk=21) protected android.content.pm.ProviderInfo resolveContentProviderAsUser(java.lang.String name, int flags, int userId)
@Implementation protected android.content.pm.PackageInfo getPackageInfo(java.lang.String packageName, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent intent, int flags)
@Implementation(minSdk=17) protected java.util.List<android.content.pm.ResolveInfo> queryIntentServicesAsUser(android.content.Intent intent, int flags, int userId)
Behaves as queryIntentServices(Intent, int)
and currently ignores userId.
@Implementation protected java.util.List<android.content.pm.ResolveInfo> queryIntentActivities(android.content.Intent intent, int flags)
@Implementation(minSdk=17) protected java.util.List<android.content.pm.ResolveInfo> queryIntentActivitiesAsUser(android.content.Intent intent, int flags, int userId)
Behaves as queryIntentActivities(Intent, int)
and currently ignores userId.
@Implementation protected int checkPermission(java.lang.String permName, java.lang.String pkgName)
@Implementation protected android.content.pm.ActivityInfo getReceiverInfo(android.content.ComponentName className, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent intent, int flags)
@Implementation protected android.content.pm.ResolveInfo resolveService(android.content.Intent intent, int flags)
@Implementation protected android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName className, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo applicationInfo) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.util.List<android.content.pm.ApplicationInfo> getInstalledApplications(int flags)
@Implementation protected java.lang.String getInstallerPackageName(java.lang.String packageName)
@Implementation protected android.content.pm.PermissionInfo getPermissionInfo(java.lang.String name, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected boolean shouldShowRequestPermissionRationale(java.lang.String permission)
@Implementation protected android.content.pm.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, android.content.pm.IPackageDataObserver observer)
freeStorageAndNotify
in class ShadowPackageManager
@Implementation(minSdk=23) protected void freeStorageAndNotify(java.lang.String volumeUuid, long freeStorageSize, android.content.pm.IPackageDataObserver observer)
@Implementation protected void setInstallerPackageName(java.lang.String targetPackage, java.lang.String installerPackageName)
@Implementation(minSdk=19) protected java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent intent, int flags)
@Implementation(minSdk=19) protected java.util.List<android.content.pm.ResolveInfo> queryIntentContentProvidersAsUser(android.content.Intent intent, int flags, int userId)
@Implementation(minSdk=23) protected java.lang.String getPermissionControllerPackageName()
@Implementation(maxSdk=16) protected void getPackageSizeInfo(java.lang.Object pkgName, java.lang.Object observer)
@Implementation(minSdk=17, maxSdk=23) protected void getPackageSizeInfo(java.lang.Object pkgName, java.lang.Object uid, java.lang.Object observer)
@Implementation(minSdk=24) protected void getPackageSizeInfoAsUser(java.lang.Object pkgName, java.lang.Object uid, java.lang.Object observer)
@Implementation protected void deletePackage(java.lang.String packageName, android.content.pm.IPackageDeleteObserver observer, int flags)
@Implementation protected java.lang.String[] currentToCanonicalPackageNames(java.lang.String[] names)
@Implementation protected boolean isSafeMode()
@Implementation protected android.graphics.drawable.Drawable getApplicationIcon(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo info)
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getUserBadgeForDensity(android.os.UserHandle userHandle, int i)
@Implementation protected int checkSignatures(java.lang.String pkg1, java.lang.String pkg2)
@Implementation protected int checkSignatures(int uid1, int uid2)
@Implementation protected java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String group, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.content.Intent getLaunchIntentForPackage(java.lang.String packageName)
@Implementation(minSdk=24) protected android.content.pm.PackageInfo getPackageInfoAsUser(java.lang.String packageName, int flags, int userId) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.lang.String[] canonicalToCurrentPackageNames(java.lang.String[] names)
@Implementation protected int[] getPackageGids(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int[] getPackageGids(java.lang.String packageName, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=18) protected int getPackageUid(java.lang.String packageName, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int getPackageUidAsUser(java.lang.String packageName, int userId) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int getPackageUidAsUser(java.lang.String packageName, int flags, int userId) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.content.pm.PermissionGroupInfo getPermissionGroupInfo(java.lang.String name, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
ShadowPackageManager.addPermissionGroupInfo(android.content.pm.PermissionGroupInfo)
@Implementation protected java.util.List<android.content.pm.PermissionGroupInfo> getAllPermissionGroups(int flags)
@Implementation protected android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String packageName, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.lang.String[] getSystemSharedLibraryNames()
Returns all the values added via ShadowPackageManager.addSystemSharedLibraryName(String)
.
@Implementation(minSdk=24) protected java.lang.String getServicesSystemSharedLibraryPackageName()
@Implementation(minSdk=24) protected java.lang.String getSharedSystemSharedLibraryPackageName()
@Implementation(minSdk=24) protected boolean hasSystemFeature(java.lang.String name, int version)
@Implementation(minSdk=23) protected boolean isPermissionRevokedByPolicy(java.lang.String permName, java.lang.String pkgName)
@Implementation protected boolean addPermission(android.content.pm.PermissionInfo info)
@Implementation protected boolean addPermissionAsync(android.content.pm.PermissionInfo info)
@Implementation protected void removePermission(java.lang.String name)
@Implementation(minSdk=23) protected void grantRuntimePermission(java.lang.String packageName, java.lang.String permissionName, android.os.UserHandle user)
@Implementation(minSdk=23) protected void revokeRuntimePermission(java.lang.String packageName, java.lang.String permissionName, android.os.UserHandle user)
@Implementation(minSdk=23) protected int getPermissionFlags(java.lang.String permissionName, java.lang.String packageName, android.os.UserHandle user)
@Implementation(minSdk=23) protected void updatePermissionFlags(java.lang.String permissionName, java.lang.String packageName, int flagMask, int flagValues, android.os.UserHandle user)
@Implementation protected int getUidForSharedUser(java.lang.String sharedUserName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser(int flags, int userId)
@Implementation(minSdk=18) protected java.util.List<android.content.pm.PackageInfo> getPackagesHoldingPermissions(java.lang.String[] permissions, int flags)
@Implementation(minSdk=17) protected android.content.pm.ResolveInfo resolveActivityAsUser(android.content.Intent intent, int flags, int userId)
@Implementation protected java.util.List<android.content.pm.ResolveInfo> queryIntentActivityOptions(android.content.ComponentName caller, android.content.Intent[] specifics, android.content.Intent intent, int flags)
@Implementation(minSdk=24) protected java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceiversAsUser(android.content.Intent intent, int flags, int userId)
@Implementation protected java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String processName, int uid, int flags)
@Implementation protected android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName className, int flags) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String targetPackage, int flags)
@Implementation protected android.graphics.drawable.Drawable getDrawable(java.lang.String packageName, @DrawableRes int resId, android.content.pm.ApplicationInfo appInfo)
@Implementation protected android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName activityName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.graphics.drawable.Drawable getDefaultActivityIcon()
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName activityName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getActivityBanner(android.content.Intent intent) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo info)
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getApplicationBanner(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.graphics.drawable.Drawable getActivityLogo(android.content.ComponentName activityName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.graphics.drawable.Drawable getActivityLogo(android.content.Intent intent) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo info)
@Implementation protected android.graphics.drawable.Drawable getApplicationLogo(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable icon, android.os.UserHandle user)
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable drawable, android.os.UserHandle user, android.graphics.Rect badgeLocation, int badgeDensity)
@Implementation(minSdk=24) protected android.graphics.drawable.Drawable getUserBadgeForDensityNoBackground(android.os.UserHandle user, int density)
@Implementation(minSdk=21) protected java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence label, android.os.UserHandle user)
@Implementation protected android.content.res.Resources getResourcesForActivity(android.content.ComponentName activityName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation protected android.content.res.Resources getResourcesForApplication(java.lang.String appPackageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=17) protected android.content.res.Resources getResourcesForApplicationAsUser(java.lang.String appPackageName, int userId) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected void addOnPermissionsChangeListener(java.lang.Object listener)
@Implementation(minSdk=23) protected void removeOnPermissionsChangeListener(java.lang.Object listener)
@Implementation(maxSdk=27) protected void installPackage(java.lang.Object packageURI, java.lang.Object observer, java.lang.Object flags, java.lang.Object installerPackageName)
@Implementation(minSdk=17) protected int installExistingPackage(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=24) protected int installExistingPackageAsUser(java.lang.String packageName, int userId) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException
@Implementation(minSdk=23) protected void verifyIntentFilter(int id, int verificationCode, java.util.List<java.lang.String> failedDomains)
@Implementation(minSdk=24) protected int getIntentVerificationStatusAsUser(java.lang.String packageName, int userId)
@Implementation(minSdk=24) protected boolean updateIntentVerificationStatusAsUser(java.lang.String packageName, int status, int userId)
@Implementation(minSdk=23) protected java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(java.lang.String packageName)
@Implementation(minSdk=23) protected java.util.List<android.content.IntentFilter> getAllIntentFilters(java.lang.String packageName)
@Implementation(minSdk=24) protected java.lang.String getDefaultBrowserPackageNameAsUser(int userId)
@Implementation(minSdk=24) protected boolean setDefaultBrowserPackageNameAsUser(java.lang.String packageName, int userId)
@Implementation(minSdk=23) protected int getMoveStatus(int moveId)
@Implementation(minSdk=23) protected void registerMoveCallback(java.lang.Object callback, java.lang.Object handler)
@Implementation(minSdk=23) protected void unregisterMoveCallback(java.lang.Object callback)
@Implementation(minSdk=23) protected java.lang.Object movePackage(java.lang.Object packageName, java.lang.Object vol)
@Implementation(minSdk=23) protected java.lang.Object getPackageCurrentVolume(java.lang.Object app)
@Implementation(minSdk=23) protected java.util.List<android.os.storage.VolumeInfo> getPackageCandidateVolumes(android.content.pm.ApplicationInfo app)
@Implementation(minSdk=23) protected java.lang.Object movePrimaryStorage(java.lang.Object vol)
@Implementation(minSdk=23) protected java.lang.Object getPrimaryStorageCurrentVolume()
@Implementation(minSdk=23) protected java.util.List<android.os.storage.VolumeInfo> getPrimaryStorageCandidateVolumes()
@Implementation(minSdk=24) protected void deletePackageAsUser(java.lang.String packageName, android.content.pm.IPackageDeleteObserver observer, int flags, int userId)
@Implementation protected void clearApplicationUserData(java.lang.String packageName, android.content.pm.IPackageDataObserver observer)
@Implementation protected void deleteApplicationCacheFiles(java.lang.String packageName, android.content.pm.IPackageDataObserver observer)
@Implementation(minSdk=24) protected void deleteApplicationCacheFilesAsUser(java.lang.String packageName, int userId, android.content.pm.IPackageDataObserver observer)
@Implementation(minSdk=23) protected void freeStorage(java.lang.String volumeUuid, long freeStorageSize, android.content.IntentSender pi)
@Implementation(minSdk=24, maxSdk=27) protected java.lang.String[] setPackagesSuspendedAsUser(java.lang.String[] packageNames, boolean suspended, int userId)
@Implementation(minSdk=24) protected boolean isPackageSuspendedForUser(java.lang.String packageName, int userId)
@Implementation protected void addPackageToPreferred(java.lang.String packageName)
@Implementation protected void removePackageFromPreferred(java.lang.String packageName)
@Implementation protected java.util.List<android.content.pm.PackageInfo> getPreferredPackages(int flags)
@Implementation public void addPreferredActivity(android.content.IntentFilter filter, int match, android.content.ComponentName[] set, android.content.ComponentName activity)
@Implementation protected void replacePreferredActivity(android.content.IntentFilter filter, int match, android.content.ComponentName[] set, android.content.ComponentName activity)
@Implementation public int getPreferredActivities(java.util.List<android.content.IntentFilter> outFilters, java.util.List<android.content.ComponentName> outActivities, java.lang.String packageName)
@Implementation protected void clearPackagePreferredActivities(java.lang.String packageName)
@Implementation(minSdk=19) protected android.content.ComponentName getHomeActivities(java.util.List<android.content.pm.ResolveInfo> outActivities)
@Implementation(minSdk=24) protected void flushPackageRestrictionsAsUser(int userId)
@Implementation(minSdk=21) protected boolean setApplicationHiddenSettingAsUser(java.lang.String packageName, boolean hidden, android.os.UserHandle user)
@Implementation(minSdk=21) protected boolean getApplicationHiddenSettingAsUser(java.lang.String packageName, android.os.UserHandle user)
@Implementation(minSdk=21) protected java.lang.Object getKeySetByAlias(java.lang.String packageName, java.lang.String alias)
@Implementation(minSdk=21) protected java.lang.Object getSigningKeySet(java.lang.String packageName)
@Implementation(minSdk=21) protected boolean isSignedBy(java.lang.String packageName, java.lang.Object ks)
@Implementation(minSdk=21) protected boolean isSignedByExactly(java.lang.String packageName, java.lang.Object ks)
@Implementation protected android.content.pm.VerifierDeviceIdentity getVerifierDeviceIdentity()
@Implementation(minSdk=22) protected boolean isUpgrade()
@Implementation(minSdk=21) protected boolean isPackageAvailable(java.lang.String packageName)
@Implementation(minSdk=21) protected void addCrossProfileIntentFilter(android.content.IntentFilter filter, int sourceUserId, int targetUserId, int flags)
@Implementation(minSdk=21) protected void clearCrossProfileIntentFilters(int sourceUserId)
@Implementation(minSdk=21) protected android.graphics.drawable.Drawable loadItemIcon(android.content.pm.PackageItemInfo itemInfo, android.content.pm.ApplicationInfo appInfo)
@Implementation(minSdk=22) protected android.graphics.drawable.Drawable loadUnbadgedItemIcon(android.content.pm.PackageItemInfo itemInfo, android.content.pm.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.
@Implementation(minSdk=26) protected boolean canRequestPackageInstalls()
@Implementation(minSdk=26) protected java.lang.Object getChangedPackages(int sequenceNumber)
@Implementation(minSdk=28) public java.lang.String getSystemTextClassifierPackageName()
@Implementation(minSdk=28) @HiddenApi protected java.lang.String[] setPackagesSuspended(java.lang.String[] packageNames, boolean suspended, android.os.PersistableBundle appExtras, android.os.PersistableBundle launcherExtras, java.lang.String dialogMessage)
@HiddenApi @Implementation(minSdk=28) protected boolean isPackageSuspended(java.lang.String packageName) throws android.content.pm.PackageManager.NameNotFoundException
android.content.pm.PackageManager.NameNotFoundException