Class ShadowPackageInstaller


  • @Implements(value=android.content.pm.PackageInstaller.class,
                minSdk=21)
    public class ShadowPackageInstaller
    extends java.lang.Object
    • Constructor Detail

      • ShadowPackageInstaller

        public ShadowPackageInstaller()
    • Method Detail

      • getAllSessions

        @Implementation
        protected java.util.List<android.content.pm.PackageInstaller.SessionInfo> getAllSessions()
      • registerSessionCallback

        @Implementation
        protected void registerSessionCallback​(android.content.pm.PackageInstaller.SessionCallback callback,
                                               android.os.Handler handler)
      • getSessionInfo

        @Implementation
        protected android.content.pm.PackageInstaller.SessionInfo getSessionInfo​(int sessionId)
      • createSession

        @Implementation
        protected int createSession​(android.content.pm.PackageInstaller.SessionParams params)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • abandonSession

        @Implementation
        protected void abandonSession​(int sessionId)
      • openSession

        @Implementation
        protected android.content.pm.PackageInstaller.Session openSession​(int sessionId)
                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • setSessionProgress

        public void setSessionProgress​(int sessionId,
                                       float progress)
      • setSessionSucceeds

        @Deprecated
        public void setSessionSucceeds​(int sessionId)
        Deprecated.
        Prefer instead to use the Android APIs to close the session PackageInstaller.Session.commit(IntentSender)
      • setSessionFails

        public void setSessionFails​(int sessionId)