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
Shadow for PackageInstaller.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classShadow for PackageInstaller.SessionInfo. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidabandonSession(int sessionId) protected intprotected List<PackageInstaller.SessionInfo>protected List<PackageInstaller.SessionInfo>protected PackageInstaller.SessionInfogetSessionInfo(int sessionId) protected PackageInstaller.SessionopenSession(int sessionId) protected voidregisterSessionCallback(PackageInstaller.SessionCallback callback, Handler handler) voidsetSessionActiveState(int sessionId, boolean active) voidsetSessionFails(int sessionId) voidsetSessionProgress(int sessionId, float progress) voidsetSessionSucceeds(int sessionId) Deprecated.protected voidprotected voidupdateSessionAppIcon(int sessionId, Bitmap appIcon) protected voidupdateSessionAppLabel(int sessionId, CharSequence appLabel)
-
Constructor Details
-
ShadowPackageInstaller
public ShadowPackageInstaller()
-
-
Method Details
-
getAllSessions
-
getMySessions
-
registerSessionCallback
@Implementation protected void registerSessionCallback(PackageInstaller.SessionCallback callback, Handler handler) -
unregisterSessionCallback
-
getSessionInfo
-
createSession
@Implementation protected int createSession(PackageInstaller.SessionParams params) throws IOException - Throws:
IOException
-
abandonSession
-
openSession
- Throws:
IOException
-
updateSessionAppIcon
-
updateSessionAppLabel
-
getAllSessionCallbacks
-
setSessionProgress
public void setSessionProgress(int sessionId, float progress) -
setSessionActiveState
public void setSessionActiveState(int sessionId, boolean active) -
setSessionSucceeds
Deprecated.Prefer instead to use the Android APIs to close the sessionPackageInstaller.Session.commit(IntentSender) -
setSessionFails
public void setSessionFails(int sessionId)
-