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
All Methods Instance Methods Concrete Methods Deprecated Methods 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.protected voidunregisterSessionCallback(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)
-
-