Package org.robolectric.shadows
Class ShadowPackageInstaller
- java.lang.Object
-
- org.robolectric.shadows.ShadowPackageInstaller
-
@Implements(value=android.content.pm.PackageInstaller.class, minSdk=21) public class ShadowPackageInstaller extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowPackageInstaller.ShadowSession
-
Constructor Summary
Constructors Constructor Description ShadowPackageInstaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidabandonSession(int sessionId)protected intcreateSession(android.content.pm.PackageInstaller.SessionParams params)protected java.util.List<android.content.pm.PackageInstaller.SessionInfo>getAllSessions()protected android.content.pm.PackageInstaller.SessionInfogetSessionInfo(int sessionId)protected android.content.pm.PackageInstaller.SessionopenSession(int sessionId)protected voidregisterSessionCallback(android.content.pm.PackageInstaller.SessionCallback callback, android.os.Handler handler)voidsetSessionFails(int sessionId)voidsetSessionProgress(int sessionId, float progress)voidsetSessionSucceeds(int sessionId)Deprecated.
-
-
-
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 sessionPackageInstaller.Session.commit(IntentSender)
-
setSessionFails
public void setSessionFails(int sessionId)
-
-