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 class
ShadowPackageInstaller.ShadowSession
-
Constructor Summary
Constructors Constructor Description ShadowPackageInstaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
abandonSession(int sessionId)
protected int
createSession(PackageInstaller.SessionParams params)
protected List<PackageInstaller.SessionInfo>
getAllSessions()
protected List<PackageInstaller.SessionInfo>
getMySessions()
protected PackageInstaller.SessionInfo
getSessionInfo(int sessionId)
protected PackageInstaller.Session
openSession(int sessionId)
protected void
registerSessionCallback(PackageInstaller.SessionCallback callback, Handler handler)
void
setSessionFails(int sessionId)
void
setSessionProgress(int sessionId, float progress)
void
setSessionSucceeds(int sessionId)
Deprecated.protected void
unregisterSessionCallback(PackageInstaller.SessionCallback callback)
-
-
-
Method Detail
-
getAllSessions
@Implementation protected List<PackageInstaller.SessionInfo> getAllSessions()
-
getMySessions
@Implementation protected List<PackageInstaller.SessionInfo> getMySessions()
-
registerSessionCallback
@Implementation protected void registerSessionCallback(PackageInstaller.SessionCallback callback, Handler handler)
-
unregisterSessionCallback
@Implementation protected void unregisterSessionCallback(PackageInstaller.SessionCallback callback)
-
getSessionInfo
@Implementation protected PackageInstaller.SessionInfo getSessionInfo(int sessionId)
-
createSession
@Implementation protected int createSession(PackageInstaller.SessionParams params) throws IOException
- Throws:
IOException
-
abandonSession
@Implementation protected void abandonSession(int sessionId)
-
openSession
@Implementation protected PackageInstaller.Session openSession(int sessionId) throws IOException
- Throws:
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)
-
-