Class ShadowApplicationPackageManager


  • @Implements(value=android.app.ApplicationPackageManager.class,
                isInAndroidSdk=false,
                looseSignatures=true)
    public class ShadowApplicationPackageManager
    extends ShadowPackageManager
    • Constructor Detail

      • ShadowApplicationPackageManager

        public ShadowApplicationPackageManager()
    • Method Detail

      • getInstalledPackages

        @Implementation
        public java.util.List<android.content.pm.PackageInfo> getInstalledPackages​(int flags)
      • getInstalledModules

        @Implementation(minSdk=29)
        protected java.util.List<android.content.pm.ModuleInfo> getInstalledModules​(int flags)
      • getModuleInfo

        @Implementation(minSdk=29)
        protected java.lang.Object getModuleInfo​(java.lang.String packageName,
                                                 int flags)
                                          throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getActivityInfo

        @Implementation
        protected android.content.pm.ActivityInfo getActivityInfo​(android.content.ComponentName component,
                                                                  int flags)
                                                           throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • hasSystemFeature

        @Implementation
        protected boolean hasSystemFeature​(java.lang.String name)
      • getComponentEnabledSetting

        @Implementation
        protected int getComponentEnabledSetting​(android.content.ComponentName componentName)
      • getNameForUid

        @Implementation
        protected java.lang.String getNameForUid​(int uid)
      • getApplicationEnabledSetting

        @Implementation
        protected int getApplicationEnabledSetting​(java.lang.String packageName)
      • getProviderInfo

        @Implementation
        protected android.content.pm.ProviderInfo getProviderInfo​(android.content.ComponentName component,
                                                                  int flags)
                                                           throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • setComponentEnabledSetting

        @Implementation
        protected void setComponentEnabledSetting​(android.content.ComponentName componentName,
                                                  int newState,
                                                  int flags)
      • setApplicationEnabledSetting

        @Implementation
        protected void setApplicationEnabledSetting​(java.lang.String packageName,
                                                    int newState,
                                                    int flags)
      • resolveActivity

        @Implementation
        protected android.content.pm.ResolveInfo resolveActivity​(android.content.Intent intent,
                                                                 int flags)
      • resolveContentProvider

        @Implementation
        protected android.content.pm.ProviderInfo resolveContentProvider​(java.lang.String name,
                                                                         int flags)
      • resolveContentProviderAsUser

        @Implementation(minSdk=21)
        protected android.content.pm.ProviderInfo resolveContentProviderAsUser​(java.lang.String name,
                                                                               int flags,
                                                                               int userId)
      • getPackageInfo

        @Implementation
        protected android.content.pm.PackageInfo getPackageInfo​(java.lang.String packageName,
                                                                int flags)
                                                         throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • queryIntentServices

        @Implementation
        protected java.util.List<android.content.pm.ResolveInfo> queryIntentServices​(android.content.Intent intent,
                                                                                     int flags)
      • queryIntentServicesAsUser

        @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.
      • queryIntentActivities

        @Implementation
        protected java.util.List<android.content.pm.ResolveInfo> queryIntentActivities​(android.content.Intent intent,
                                                                                       int flags)
      • queryIntentActivitiesAsUser

        @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.
      • checkPermission

        @Implementation
        protected int checkPermission​(java.lang.String permName,
                                      java.lang.String pkgName)
      • getReceiverInfo

        @Implementation
        protected android.content.pm.ActivityInfo getReceiverInfo​(android.content.ComponentName component,
                                                                  int flags)
                                                           throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • queryBroadcastReceivers

        @Implementation
        protected java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers​(android.content.Intent intent,
                                                                                         int flags)
      • resolveService

        @Implementation
        protected android.content.pm.ResolveInfo resolveService​(android.content.Intent intent,
                                                                int flags)
      • getServiceInfo

        @Implementation
        protected android.content.pm.ServiceInfo getServiceInfo​(android.content.ComponentName component,
                                                                int flags)
                                                         throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getResourcesForApplication

        @Implementation
        protected android.content.res.Resources getResourcesForApplication​(android.content.pm.ApplicationInfo applicationInfo)
                                                                    throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getInstalledApplications

        @Implementation
        protected java.util.List<android.content.pm.ApplicationInfo> getInstalledApplications​(int flags)
      • getInstallerPackageName

        @Implementation
        protected java.lang.String getInstallerPackageName​(java.lang.String packageName)
      • getPermissionInfo

        @Implementation
        protected android.content.pm.PermissionInfo getPermissionInfo​(java.lang.String name,
                                                                      int flags)
                                                               throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • shouldShowRequestPermissionRationale

        @Implementation(minSdk=23)
        protected boolean shouldShowRequestPermissionRationale​(java.lang.String permission)
      • getSystemAvailableFeatures

        @Implementation
        protected android.content.pm.FeatureInfo[] getSystemAvailableFeatures()
      • verifyPendingInstall

        @Implementation
        protected void verifyPendingInstall​(int id,
                                            int verificationCode)
      • extendVerificationTimeout

        @Implementation(minSdk=17)
        protected void extendVerificationTimeout​(int id,
                                                 int verificationCodeAtTimeout,
                                                 long millisecondsToDelay)
      • freeStorageAndNotify

        @Implementation(maxSdk=22)
        protected void freeStorageAndNotify​(long freeStorageSize,
                                            android.content.pm.IPackageDataObserver observer)
        Overrides:
        freeStorageAndNotify in class ShadowPackageManager
      • freeStorageAndNotify

        @Implementation(minSdk=23)
        protected void freeStorageAndNotify​(java.lang.String volumeUuid,
                                            long freeStorageSize,
                                            android.content.pm.IPackageDataObserver observer)
      • setInstallerPackageName

        @Implementation
        protected void setInstallerPackageName​(java.lang.String targetPackage,
                                               java.lang.String installerPackageName)
      • queryIntentContentProviders

        @Implementation(minSdk=19)
        protected java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders​(android.content.Intent intent,
                                                                                             int flags)
      • queryIntentContentProvidersAsUser

        @Implementation(minSdk=19)
        protected java.util.List<android.content.pm.ResolveInfo> queryIntentContentProvidersAsUser​(android.content.Intent intent,
                                                                                                   int flags,
                                                                                                   int userId)
      • getPermissionControllerPackageName

        @Implementation(minSdk=23)
        protected java.lang.String getPermissionControllerPackageName()
      • getPackageSizeInfo

        @Implementation(maxSdk=16)
        protected void getPackageSizeInfo​(java.lang.Object pkgName,
                                          java.lang.Object observer)
      • getPackageSizeInfo

        @Implementation(minSdk=17,
                        maxSdk=23)
        protected void getPackageSizeInfo​(java.lang.Object pkgName,
                                          java.lang.Object uid,
                                          java.lang.Object observer)
      • getPackageSizeInfoAsUser

        @Implementation(minSdk=24)
        protected void getPackageSizeInfoAsUser​(java.lang.Object pkgName,
                                                java.lang.Object uid,
                                                java.lang.Object observer)
      • deletePackage

        @Implementation
        protected void deletePackage​(java.lang.String packageName,
                                     android.content.pm.IPackageDeleteObserver observer,
                                     int flags)
        Overrides:
        deletePackage in class ShadowPackageManager
      • currentToCanonicalPackageNames

        @Implementation
        protected java.lang.String[] currentToCanonicalPackageNames​(java.lang.String[] names)
      • canonicalToCurrentPackageNames

        @Implementation
        protected java.lang.String[] canonicalToCurrentPackageNames​(java.lang.String[] names)
      • isSafeMode

        @Implementation
        protected boolean isSafeMode()
      • getApplicationIcon

        @Implementation
        protected android.graphics.drawable.Drawable getApplicationIcon​(java.lang.String packageName)
                                                                 throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getApplicationIcon

        @Implementation
        protected android.graphics.drawable.Drawable getApplicationIcon​(android.content.pm.ApplicationInfo info)
                                                                 throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getUserBadgeForDensity

        @Implementation(minSdk=21)
        protected android.graphics.drawable.Drawable getUserBadgeForDensity​(android.os.UserHandle userHandle,
                                                                            int i)
      • checkSignatures

        @Implementation
        protected int checkSignatures​(java.lang.String pkg1,
                                      java.lang.String pkg2)
      • checkSignatures

        @Implementation
        protected int checkSignatures​(int uid1,
                                      int uid2)
      • queryPermissionsByGroup

        @Implementation
        protected java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup​(java.lang.String group,
                                                                                            int flags)
                                                                                     throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getLaunchIntentForPackage

        @Implementation
        protected android.content.Intent getLaunchIntentForPackage​(java.lang.String packageName)
      • getLeanbackLaunchIntentForPackage

        @Implementation(minSdk=21)
        protected android.content.Intent getLeanbackLaunchIntentForPackage​(java.lang.String packageName)
      • getPackageInfoAsUser

        @Implementation(minSdk=24)
        protected android.content.pm.PackageInfo getPackageInfoAsUser​(java.lang.String packageName,
                                                                      int flags,
                                                                      int userId)
                                                               throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getPackageGids

        @Implementation
        protected int[] getPackageGids​(java.lang.String packageName)
                                throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getPackageGids

        @Implementation(minSdk=24)
        protected int[] getPackageGids​(java.lang.String packageName,
                                       int flags)
                                throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getPackageUid

        @Implementation(minSdk=18)
        protected int getPackageUid​(java.lang.String packageName,
                                    int flags)
                             throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getPackageUidAsUser

        @Implementation(minSdk=24)
        protected int getPackageUidAsUser​(java.lang.String packageName,
                                          int userId)
                                   throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getPackageUidAsUser

        @Implementation(minSdk=24)
        protected int getPackageUidAsUser​(java.lang.String packageName,
                                          int flags,
                                          int userId)
                                   throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getApplicationInfo

        @Implementation
        protected android.content.pm.ApplicationInfo getApplicationInfo​(java.lang.String packageName,
                                                                        int flags)
                                                                 throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getServicesSystemSharedLibraryPackageName

        @Implementation(minSdk=24)
        protected java.lang.String getServicesSystemSharedLibraryPackageName()
      • getSharedSystemSharedLibraryPackageName

        @Implementation(minSdk=24)
        protected java.lang.String getSharedSystemSharedLibraryPackageName()
      • hasSystemFeature

        @Implementation(minSdk=24)
        protected boolean hasSystemFeature​(java.lang.String name,
                                           int version)
      • isPermissionRevokedByPolicy

        @Implementation(minSdk=23)
        protected boolean isPermissionRevokedByPolicy​(java.lang.String permName,
                                                      java.lang.String pkgName)
      • addPermission

        @Implementation
        protected boolean addPermission​(android.content.pm.PermissionInfo info)
      • addPermissionAsync

        @Implementation
        protected boolean addPermissionAsync​(android.content.pm.PermissionInfo info)
      • removePermission

        @Implementation
        protected void removePermission​(java.lang.String name)
      • grantRuntimePermission

        @Implementation(minSdk=23)
        protected void grantRuntimePermission​(java.lang.String packageName,
                                              java.lang.String permissionName,
                                              android.os.UserHandle user)
      • revokeRuntimePermission

        @Implementation(minSdk=23)
        protected void revokeRuntimePermission​(java.lang.String packageName,
                                               java.lang.String permissionName,
                                               android.os.UserHandle user)
      • getPermissionFlags

        @Implementation(minSdk=23)
        protected int getPermissionFlags​(java.lang.String permissionName,
                                         java.lang.String packageName,
                                         android.os.UserHandle user)
      • updatePermissionFlags

        @Implementation(minSdk=23)
        protected void updatePermissionFlags​(java.lang.String permissionName,
                                             java.lang.String packageName,
                                             int flagMask,
                                             int flagValues,
                                             android.os.UserHandle user)
      • getUidForSharedUser

        @Implementation
        protected int getUidForSharedUser​(java.lang.String sharedUserName)
                                   throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getInstalledPackagesAsUser

        @Implementation(minSdk=24)
        protected java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser​(int flags,
                                                                                            int userId)
      • getPackagesHoldingPermissions

        @Implementation(minSdk=18)
        protected java.util.List<android.content.pm.PackageInfo> getPackagesHoldingPermissions​(java.lang.String[] permissions,
                                                                                               int flags)
      • resolveActivityAsUser

        @Implementation(minSdk=17)
        protected android.content.pm.ResolveInfo resolveActivityAsUser​(android.content.Intent intent,
                                                                       int flags,
                                                                       int userId)
        Behaves as resolveActivity(Intent, int) and currently ignores userId.
      • queryIntentActivityOptions

        @Implementation
        protected java.util.List<android.content.pm.ResolveInfo> queryIntentActivityOptions​(android.content.ComponentName caller,
                                                                                            android.content.Intent[] specifics,
                                                                                            android.content.Intent intent,
                                                                                            int flags)
      • queryBroadcastReceiversAsUser

        @Implementation(minSdk=24)
        protected java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceiversAsUser​(android.content.Intent intent,
                                                                                               int flags,
                                                                                               int userId)
      • queryContentProviders

        @Implementation
        protected java.util.List<android.content.pm.ProviderInfo> queryContentProviders​(java.lang.String processName,
                                                                                        int uid,
                                                                                        int flags)
      • getInstrumentationInfo

        @Implementation
        protected android.content.pm.InstrumentationInfo getInstrumentationInfo​(android.content.ComponentName className,
                                                                                int flags)
                                                                         throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • queryInstrumentation

        @Implementation
        protected java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation​(java.lang.String targetPackage,
                                                                                              int flags)
      • getDrawable

        @Implementation
        protected android.graphics.drawable.Drawable getDrawable​(java.lang.String packageName,
                                                                 @DrawableRes
                                                                 int resId,
                                                                 android.content.pm.ApplicationInfo appInfo)
      • getActivityIcon

        @Implementation
        protected android.graphics.drawable.Drawable getActivityIcon​(android.content.ComponentName activityName)
                                                              throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getDefaultActivityIcon

        @Implementation
        protected android.graphics.drawable.Drawable getDefaultActivityIcon()
      • getResourcesForActivity

        @Implementation
        protected android.content.res.Resources getResourcesForActivity​(android.content.ComponentName activityName)
                                                                 throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getResourcesForApplication

        @Implementation
        protected android.content.res.Resources getResourcesForApplication​(java.lang.String appPackageName)
                                                                    throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • getResourcesForApplicationAsUser

        @Implementation(minSdk=17)
        protected android.content.res.Resources getResourcesForApplicationAsUser​(java.lang.String appPackageName,
                                                                                 int userId)
                                                                          throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • addOnPermissionsChangeListener

        @Implementation(minSdk=23)
        protected void addOnPermissionsChangeListener​(java.lang.Object listener)
      • removeOnPermissionsChangeListener

        @Implementation(minSdk=23)
        protected void removeOnPermissionsChangeListener​(java.lang.Object listener)
      • installPackage

        @Implementation(maxSdk=27)
        protected void installPackage​(java.lang.Object packageURI,
                                      java.lang.Object observer,
                                      java.lang.Object flags,
                                      java.lang.Object installerPackageName)
      • installExistingPackage

        @Implementation(minSdk=17)
        protected int installExistingPackage​(java.lang.String packageName)
                                      throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • installExistingPackageAsUser

        @Implementation(minSdk=24)
        protected int installExistingPackageAsUser​(java.lang.String packageName,
                                                   int userId)
                                            throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • verifyIntentFilter

        @Implementation(minSdk=23)
        protected void verifyIntentFilter​(int id,
                                          int verificationCode,
                                          java.util.List<java.lang.String> failedDomains)
      • getIntentVerificationStatusAsUser

        @Implementation(minSdk=24)
        protected int getIntentVerificationStatusAsUser​(java.lang.String packageName,
                                                        int userId)
      • updateIntentVerificationStatusAsUser

        @Implementation(minSdk=24)
        protected boolean updateIntentVerificationStatusAsUser​(java.lang.String packageName,
                                                               int status,
                                                               int userId)
      • getIntentFilterVerifications

        @Implementation(minSdk=23)
        protected java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications​(java.lang.String packageName)
      • getAllIntentFilters

        @Implementation(minSdk=23)
        protected java.util.List<android.content.IntentFilter> getAllIntentFilters​(java.lang.String packageName)
      • getDefaultBrowserPackageNameAsUser

        @Implementation(minSdk=24)
        protected java.lang.String getDefaultBrowserPackageNameAsUser​(int userId)
      • setDefaultBrowserPackageNameAsUser

        @Implementation(minSdk=24)
        protected boolean setDefaultBrowserPackageNameAsUser​(java.lang.String packageName,
                                                             int userId)
      • getMoveStatus

        @Implementation(minSdk=23)
        protected int getMoveStatus​(int moveId)
      • registerMoveCallback

        @Implementation(minSdk=23)
        protected void registerMoveCallback​(java.lang.Object callback,
                                            java.lang.Object handler)
      • unregisterMoveCallback

        @Implementation(minSdk=23)
        protected void unregisterMoveCallback​(java.lang.Object callback)
      • movePackage

        @Implementation(minSdk=23)
        protected java.lang.Object movePackage​(java.lang.Object packageName,
                                               java.lang.Object vol)
      • getPackageCurrentVolume

        @Implementation(minSdk=23)
        protected java.lang.Object getPackageCurrentVolume​(java.lang.Object app)
      • getPackageCandidateVolumes

        @Implementation(minSdk=23)
        protected java.util.List<android.os.storage.VolumeInfo> getPackageCandidateVolumes​(android.content.pm.ApplicationInfo app)
      • movePrimaryStorage

        @Implementation(minSdk=23)
        protected java.lang.Object movePrimaryStorage​(java.lang.Object vol)
      • getPrimaryStorageCurrentVolume

        @Implementation(minSdk=23)
        protected java.lang.Object getPrimaryStorageCurrentVolume()
      • getPrimaryStorageCandidateVolumes

        @Implementation(minSdk=23)
        protected java.util.List<android.os.storage.VolumeInfo> getPrimaryStorageCandidateVolumes()
      • deletePackageAsUser

        @Implementation(minSdk=24)
        protected void deletePackageAsUser​(java.lang.String packageName,
                                           android.content.pm.IPackageDeleteObserver observer,
                                           int flags,
                                           int userId)
      • clearApplicationUserData

        @Implementation
        protected void clearApplicationUserData​(java.lang.String packageName,
                                                android.content.pm.IPackageDataObserver observer)
      • deleteApplicationCacheFiles

        @Implementation
        protected void deleteApplicationCacheFiles​(java.lang.String packageName,
                                                   android.content.pm.IPackageDataObserver observer)
      • deleteApplicationCacheFilesAsUser

        @Implementation(minSdk=24)
        protected void deleteApplicationCacheFilesAsUser​(java.lang.String packageName,
                                                         int userId,
                                                         android.content.pm.IPackageDataObserver observer)
      • freeStorage

        @Implementation(minSdk=23)
        protected void freeStorage​(java.lang.String volumeUuid,
                                   long freeStorageSize,
                                   android.content.IntentSender pi)
      • setPackagesSuspendedAsUser

        @Implementation(minSdk=24,
                        maxSdk=27)
        protected java.lang.String[] setPackagesSuspendedAsUser​(java.lang.String[] packageNames,
                                                                boolean suspended,
                                                                int userId)
      • isPackageSuspendedForUser

        @Implementation(minSdk=24)
        protected boolean isPackageSuspendedForUser​(java.lang.String packageName,
                                                    int userId)
      • addPackageToPreferred

        @Implementation
        protected void addPackageToPreferred​(java.lang.String packageName)
      • removePackageFromPreferred

        @Implementation
        protected void removePackageFromPreferred​(java.lang.String packageName)
      • getPreferredPackages

        @Implementation
        protected java.util.List<android.content.pm.PackageInfo> getPreferredPackages​(int flags)
      • addPreferredActivity

        @Implementation
        public void addPreferredActivity​(android.content.IntentFilter filter,
                                         int match,
                                         android.content.ComponentName[] set,
                                         android.content.ComponentName activity)
      • replacePreferredActivity

        @Implementation
        protected void replacePreferredActivity​(android.content.IntentFilter filter,
                                                int match,
                                                android.content.ComponentName[] set,
                                                android.content.ComponentName activity)
      • getPreferredActivities

        @Implementation
        public int getPreferredActivities​(java.util.List<android.content.IntentFilter> outFilters,
                                          java.util.List<android.content.ComponentName> outActivities,
                                          java.lang.String packageName)
      • clearPackagePreferredActivities

        @Implementation
        protected void clearPackagePreferredActivities​(java.lang.String packageName)
      • getHomeActivities

        @Implementation(minSdk=19)
        protected android.content.ComponentName getHomeActivities​(java.util.List<android.content.pm.ResolveInfo> outActivities)
      • flushPackageRestrictionsAsUser

        @Implementation(minSdk=24)
        protected void flushPackageRestrictionsAsUser​(int userId)
      • setApplicationHiddenSettingAsUser

        @Implementation(minSdk=21)
        protected boolean setApplicationHiddenSettingAsUser​(java.lang.String packageName,
                                                            boolean hidden,
                                                            android.os.UserHandle user)
      • getApplicationHiddenSettingAsUser

        @Implementation(minSdk=21)
        protected boolean getApplicationHiddenSettingAsUser​(java.lang.String packageName,
                                                            android.os.UserHandle user)
      • getKeySetByAlias

        @Implementation(minSdk=21)
        protected java.lang.Object getKeySetByAlias​(java.lang.String packageName,
                                                    java.lang.String alias)
      • getSigningKeySet

        @Implementation(minSdk=21)
        protected java.lang.Object getSigningKeySet​(java.lang.String packageName)
      • isSignedBy

        @Implementation(minSdk=21)
        protected boolean isSignedBy​(java.lang.String packageName,
                                     java.lang.Object ks)
      • isSignedByExactly

        @Implementation(minSdk=21)
        protected boolean isSignedByExactly​(java.lang.String packageName,
                                            java.lang.Object ks)
      • getVerifierDeviceIdentity

        @Implementation
        protected android.content.pm.VerifierDeviceIdentity getVerifierDeviceIdentity()
      • isUpgrade

        @Implementation(minSdk=22)
        protected boolean isUpgrade()
      • isPackageAvailable

        @Implementation(minSdk=21)
        protected boolean isPackageAvailable​(java.lang.String packageName)
      • addCrossProfileIntentFilter

        @Implementation(minSdk=21)
        protected void addCrossProfileIntentFilter​(android.content.IntentFilter filter,
                                                   int sourceUserId,
                                                   int targetUserId,
                                                   int flags)
      • clearCrossProfileIntentFilters

        @Implementation(minSdk=21)
        protected void clearCrossProfileIntentFilters​(int sourceUserId)
      • getUserBadgedIcon

        @Implementation(minSdk=21)
        protected android.graphics.drawable.Drawable getUserBadgedIcon​(android.graphics.drawable.Drawable icon,
                                                                       android.os.UserHandle user)
        Adds a profile badge to the icon. This implementation just returns the unbadged icon, as some default implementations add an internal resource to the icon that is unavailable to Robolectric.
      • canRequestPackageInstalls

        @Implementation(minSdk=26)
        protected boolean canRequestPackageInstalls()
      • getChangedPackages

        @Implementation(minSdk=26)
        protected java.lang.Object getChangedPackages​(int sequenceNumber)
      • getSystemTextClassifierPackageName

        @Implementation(minSdk=28)
        public java.lang.String getSystemTextClassifierPackageName()
      • setPackagesSuspended

        @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)
      • setPackagesSuspended

        @Implementation(minSdk=29)
        @HiddenApi
        protected java.lang.Object setPackagesSuspended​(java.lang.Object packageNames,
                                                        java.lang.Object suspended,
                                                        java.lang.Object appExtras,
                                                        java.lang.Object launcherExtras,
                                                        java.lang.Object dialogInfo)
      • getUnsuspendablePackages

        @HiddenApi
        @Implementation(minSdk=29)
        protected java.lang.String[] getUnsuspendablePackages​(java.lang.String[] packageNames)
      • isPackageSuspended

        @HiddenApi
        @Implementation(minSdk=28)
        protected boolean isPackageSuspended​(java.lang.String packageName)
                                      throws android.content.pm.PackageManager.NameNotFoundException
        Throws:
        android.content.pm.PackageManager.NameNotFoundException
      • isInstantApp

        @Implementation(minSdk=26)
        protected boolean isInstantApp​(java.lang.String packageName)
      • setDistractingPackageRestrictions

        @HiddenApi
        @Implementation(minSdk=29)
        protected java.lang.String[] setDistractingPackageRestrictions​(java.lang.String[] packages,
                                                                       int restrictionFlags)