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 Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowPackageInstaller.ShadowSession -
Constructor Summary
Constructors Constructor Description ShadowPackageInstaller() -
Method Summary
Modifier and Type Method Description protected voidabandonSession(int sessionId)protected intcreateSession(PackageInstaller.SessionParams params)protected List<PackageInstaller.SessionInfo>getAllSessions()protected List<PackageInstaller.SessionInfo>getMySessions()protected PackageInstaller.SessionInfogetSessionInfo(int sessionId)protected PackageInstaller.SessionopenSession(int sessionId)protected voidregisterSessionCallback(PackageInstaller.SessionCallback callback, Handler handler)voidsetSessionFails(int sessionId)voidsetSessionProgress(int sessionId, float progress)voidsetSessionSucceeds(int sessionId)Deprecated.
-
Constructor Details
-
ShadowPackageInstaller
public ShadowPackageInstaller()
-
-
Method Details
-
getAllSessions
-
getMySessions
-
registerSessionCallback
@Implementation protected void registerSessionCallback(PackageInstaller.SessionCallback callback, Handler handler) -
getSessionInfo
-
createSession
@Implementation protected int createSession(PackageInstaller.SessionParams params) throws IOException- Throws:
IOException
-
abandonSession
-
openSession
- Throws:
IOException
-
setSessionProgress
public void setSessionProgress(int sessionId, float progress) -
setSessionSucceeds
Deprecated.Prefer instead to use the Android APIs to close the sessionPackageInstaller.Session.commit(IntentSender) -
setSessionFails
public void setSessionFails(int sessionId)
-