FileDocCategorySizeDatePackage
MockPackageManager.javaAPI DocAndroid 5.1 API23623Thu Mar 12 22:22:42 GMT 2015android.test.mock

MockPackageManager

public class MockPackageManager extends android.content.pm.PackageManager
A mock {@link android.content.pm.PackageManager} class. All methods are non-functional and throw {@link java.lang.UnsupportedOperationException}. Override it to provide the operations that you need.

Fields Summary
Constructors Summary
Methods Summary
public voidaddCrossProfileIntentFilter(android.content.IntentFilter filter, int sourceUserId, int targetUserId, int flags)

hide

        throw new UnsupportedOperationException();
    
public voidaddPackageToPreferred(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public booleanaddPermission(android.content.pm.PermissionInfo info)

        throw new UnsupportedOperationException();
    
public booleanaddPermissionAsync(android.content.pm.PermissionInfo info)

        throw new UnsupportedOperationException();
    
public voidaddPreferredActivity(android.content.IntentFilter filter, int match, android.content.ComponentName[] set, android.content.ComponentName activity)

        throw new UnsupportedOperationException();
    
public java.lang.String[]canonicalToCurrentPackageNames(java.lang.String[] names)

        throw new UnsupportedOperationException();
    
public intcheckPermission(java.lang.String permName, java.lang.String pkgName)

        throw new UnsupportedOperationException();
    
public intcheckSignatures(java.lang.String pkg1, java.lang.String pkg2)

        throw new UnsupportedOperationException();
    
public intcheckSignatures(int uid1, int uid2)

        throw new UnsupportedOperationException();
    
public voidclearApplicationUserData(java.lang.String packageName, android.content.pm.IPackageDataObserver observer)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public voidclearCrossProfileIntentFilters(int sourceUserId)

hide

        throw new UnsupportedOperationException();
    
public voidclearPackagePreferredActivities(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public java.lang.String[]currentToCanonicalPackageNames(java.lang.String[] names)

        throw new UnsupportedOperationException();
    
public voiddeleteApplicationCacheFiles(java.lang.String packageName, android.content.pm.IPackageDataObserver observer)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public voiddeletePackage(java.lang.String packageName, android.content.pm.IPackageDeleteObserver observer, int flags)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public voidextendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay)

        throw new UnsupportedOperationException();
    
public voidfreeStorage(long idealStorageSize, android.content.IntentSender pi)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public voidfreeStorageAndNotify(long idealStorageSize, android.content.pm.IPackageDataObserver observer)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityBanner(android.content.ComponentName activityName)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityBanner(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityIcon(android.content.ComponentName activityName)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityIcon(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public android.content.pm.ActivityInfogetActivityInfo(android.content.ComponentName className, int flags)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityLogo(android.content.ComponentName activityName)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetActivityLogo(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public java.util.ListgetAllPermissionGroups(int flags)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetApplicationBanner(android.content.pm.ApplicationInfo info)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetApplicationBanner(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public intgetApplicationEnabledSetting(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public booleangetApplicationHiddenSettingAsUser(java.lang.String packageName, android.os.UserHandle user)

hide

        return false;
    
public android.graphics.drawable.DrawablegetApplicationIcon(android.content.pm.ApplicationInfo info)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetApplicationIcon(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public android.content.pm.ApplicationInfogetApplicationInfo(java.lang.String packageName, int flags)

        throw new UnsupportedOperationException();
    
public java.lang.CharSequencegetApplicationLabel(android.content.pm.ApplicationInfo info)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetApplicationLogo(android.content.pm.ApplicationInfo info)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetApplicationLogo(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public intgetComponentEnabledSetting(android.content.ComponentName componentName)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetDefaultActivityIcon()

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetDrawable(java.lang.String packageName, int resid, android.content.pm.ApplicationInfo appInfo)

        throw new UnsupportedOperationException();
    
public android.content.ComponentNamegetHomeActivities(java.util.List outActivities)

hide
- hidden in superclass

        throw new UnsupportedOperationException();
    
public java.util.ListgetInstalledApplications(int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListgetInstalledPackages(int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListgetInstalledPackages(int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public java.lang.StringgetInstallerPackageName(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public android.content.pm.InstrumentationInfogetInstrumentationInfo(android.content.ComponentName className, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.KeySetgetKeySetByAlias(java.lang.String packageName, java.lang.String alias)

hide

        throw new UnsupportedOperationException();
    
public android.content.IntentgetLaunchIntentForPackage(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public android.content.IntentgetLeanbackLaunchIntentForPackage(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public java.lang.StringgetNameForUid(int uid)

        throw new UnsupportedOperationException();
    
public android.content.pm.PackageInfogetPackageArchiveInfo(java.lang.String archiveFilePath, int flags)

        throw new UnsupportedOperationException();
    
public int[]getPackageGids(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public android.content.pm.PackageInfogetPackageInfo(java.lang.String packageName, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.PackageInstallergetPackageInstaller()
{@hide}

        throw new UnsupportedOperationException();
    
public voidgetPackageSizeInfo(java.lang.String packageName, int userHandle, android.content.pm.IPackageStatsObserver observer)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public intgetPackageUid(java.lang.String packageName, int userHandle)

hide

        throw new UnsupportedOperationException();
    
public java.lang.String[]getPackagesForUid(int uid)

        throw new UnsupportedOperationException();
    
public java.util.ListgetPackagesHoldingPermissions(java.lang.String[] permissions, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.PermissionGroupInfogetPermissionGroupInfo(java.lang.String name, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.PermissionInfogetPermissionInfo(java.lang.String name, int flags)

        throw new UnsupportedOperationException();
    
public intgetPreferredActivities(java.util.List outFilters, java.util.List outActivities, java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public java.util.ListgetPreferredPackages(int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.ProviderInfogetProviderInfo(android.content.ComponentName className, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.ActivityInfogetReceiverInfo(android.content.ComponentName className, int flags)

        throw new UnsupportedOperationException();
    
public android.content.res.ResourcesgetResourcesForActivity(android.content.ComponentName activityName)

        throw new UnsupportedOperationException();
    
public android.content.res.ResourcesgetResourcesForApplication(android.content.pm.ApplicationInfo app)

        throw new UnsupportedOperationException();
    
public android.content.res.ResourcesgetResourcesForApplication(java.lang.String appPackageName)

        throw new UnsupportedOperationException();
    
public android.content.res.ResourcesgetResourcesForApplicationAsUser(java.lang.String appPackageName, int userId)

hide

        throw new UnsupportedOperationException();
    
public android.content.pm.ServiceInfogetServiceInfo(android.content.ComponentName className, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.KeySetgetSigningKeySet(java.lang.String packageName)

hide

        throw new UnsupportedOperationException();
    
public android.content.pm.FeatureInfo[]getSystemAvailableFeatures()

        throw new UnsupportedOperationException();
    
public java.lang.String[]getSystemSharedLibraryNames()

        throw new UnsupportedOperationException();
    
public java.lang.CharSequencegetText(java.lang.String packageName, int resid, android.content.pm.ApplicationInfo appInfo)

        throw new UnsupportedOperationException();
    
public intgetUidForSharedUser(java.lang.String sharedUserName)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetUserBadgeForDensity(android.os.UserHandle user, int density)

hide

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetUserBadgedDrawableForDensity(android.graphics.drawable.Drawable drawable, android.os.UserHandle user, android.graphics.Rect badgeLocation, int badgeDensity)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetUserBadgedIcon(android.graphics.drawable.Drawable icon, android.os.UserHandle user)

        throw new UnsupportedOperationException();
    
public java.lang.CharSequencegetUserBadgedLabel(java.lang.CharSequence label, android.os.UserHandle user)

        throw new UnsupportedOperationException();
    
public android.content.pm.VerifierDeviceIdentitygetVerifierDeviceIdentity()

hide

        throw new UnsupportedOperationException();
    
public android.content.res.XmlResourceParsergetXml(java.lang.String packageName, int resid, android.content.pm.ApplicationInfo appInfo)

        throw new UnsupportedOperationException();
    
public voidgrantPermission(java.lang.String packageName, java.lang.String permissionName)

hide

        throw new UnsupportedOperationException();
    
public booleanhasSystemFeature(java.lang.String name)

        throw new UnsupportedOperationException();
    
public intinstallExistingPackage(java.lang.String packageName)

hide

        throw new UnsupportedOperationException();
    
public voidinstallPackage(android.net.Uri packageURI, android.app.PackageInstallObserver observer, int flags, java.lang.String installerPackageName)

hide

        throw new UnsupportedOperationException();
    
public voidinstallPackage(android.net.Uri packageURI, android.content.pm.IPackageInstallObserver observer, int flags, java.lang.String installerPackageName)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public voidinstallPackageWithVerification(android.net.Uri packageURI, android.content.pm.IPackageInstallObserver observer, int flags, java.lang.String installerPackageName, android.net.Uri verificationURI, android.content.pm.ManifestDigest manifestDigest, android.content.pm.ContainerEncryptionParams encryptionParams)

hide

        throw new UnsupportedOperationException();
    
public voidinstallPackageWithVerification(android.net.Uri packageURI, android.app.PackageInstallObserver observer, int flags, java.lang.String installerPackageName, android.net.Uri verificationURI, android.content.pm.ManifestDigest manifestDigest, android.content.pm.ContainerEncryptionParams encryptionParams)

hide

        throw new UnsupportedOperationException();
    
public voidinstallPackageWithVerificationAndEncryption(android.net.Uri packageURI, android.content.pm.IPackageInstallObserver observer, int flags, java.lang.String installerPackageName, android.content.pm.VerificationParams verificationParams, android.content.pm.ContainerEncryptionParams encryptionParams)

hide

        throw new UnsupportedOperationException();
    
public voidinstallPackageWithVerificationAndEncryption(android.net.Uri packageURI, android.app.PackageInstallObserver observer, int flags, java.lang.String installerPackageName, android.content.pm.VerificationParams verificationParams, android.content.pm.ContainerEncryptionParams encryptionParams)

hide

        throw new UnsupportedOperationException();
    
public booleanisPackageAvailable(java.lang.String packageName)
{@hide}

        throw new UnsupportedOperationException();
    
public booleanisSafeMode()

        throw new UnsupportedOperationException();
    
public booleanisSignedBy(java.lang.String packageName, android.content.pm.KeySet ks)

hide

        throw new UnsupportedOperationException();
    
public booleanisSignedByExactly(java.lang.String packageName, android.content.pm.KeySet ks)

hide

        throw new UnsupportedOperationException();
    
public booleanisUpgrade()

hide

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawableloadItemIcon(android.content.pm.PackageItemInfo itemInfo, android.content.pm.ApplicationInfo appInfo)

hide

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawableloadUnbadgedItemIcon(android.content.pm.PackageItemInfo itemInfo, android.content.pm.ApplicationInfo appInfo)

hide

        throw new UnsupportedOperationException();
    
public voidmovePackage(java.lang.String packageName, android.content.pm.IPackageMoveObserver observer, int flags)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public java.util.ListqueryBroadcastReceivers(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryBroadcastReceivers(android.content.Intent intent, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public java.util.ListqueryContentProviders(java.lang.String processName, int uid, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryInstrumentation(java.lang.String targetPackage, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentActivities(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentActivitiesAsUser(android.content.Intent intent, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentActivityOptions(android.content.ComponentName caller, android.content.Intent[] specifics, android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentContentProviders(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentContentProvidersAsUser(android.content.Intent intent, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentServices(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public java.util.ListqueryIntentServicesAsUser(android.content.Intent intent, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public java.util.ListqueryPermissionsByGroup(java.lang.String group, int flags)

        throw new UnsupportedOperationException();
    
public voidremovePackageFromPreferred(java.lang.String packageName)

        throw new UnsupportedOperationException();
    
public voidremovePermission(java.lang.String name)

        throw new UnsupportedOperationException();
    
public voidreplacePreferredActivity(android.content.IntentFilter filter, int match, android.content.ComponentName[] set, android.content.ComponentName activity)

hide
- to match hiding in superclass

        throw new UnsupportedOperationException();
    
public android.content.pm.ResolveInforesolveActivity(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.ResolveInforesolveActivityAsUser(android.content.Intent intent, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public android.content.pm.ProviderInforesolveContentProvider(java.lang.String name, int flags)

        throw new UnsupportedOperationException();
    
public android.content.pm.ProviderInforesolveContentProviderAsUser(java.lang.String name, int flags, int userId)

hide

        throw new UnsupportedOperationException();
    
public android.content.pm.ResolveInforesolveService(android.content.Intent intent, int flags)

        throw new UnsupportedOperationException();
    
public voidrevokePermission(java.lang.String packageName, java.lang.String permissionName)

hide

        throw new UnsupportedOperationException();
    
public voidsetApplicationEnabledSetting(java.lang.String packageName, int newState, int flags)

        throw new UnsupportedOperationException();
    
public booleansetApplicationHiddenSettingAsUser(java.lang.String packageName, boolean hidden, android.os.UserHandle user)

hide

        return false;
    
public voidsetComponentEnabledSetting(android.content.ComponentName componentName, int newState, int flags)

        throw new UnsupportedOperationException();
    
public voidsetInstallerPackageName(java.lang.String targetPackage, java.lang.String installerPackageName)

        throw new UnsupportedOperationException();
    
public voidverifyPendingInstall(int id, int verificationCode)

        throw new UnsupportedOperationException();