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 Classes Modifier and Type Class Description static classShadowPackageInstaller.ShadowSessionstatic classShadowPackageInstaller.ShadowSessionInfoShadow for PackageInstaller.SessionInfo.
-
Constructor Summary
Constructors Constructor Description ShadowPackageInstaller()
-
Method Summary
-
-
-
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
-
updateSessionAppIcon
@Implementation protected void updateSessionAppIcon(int sessionId, Bitmap appIcon)
-
updateSessionAppLabel
@Implementation protected void updateSessionAppLabel(int sessionId, CharSequence appLabel)
-
getAllSessionCallbacks
public List<PackageInstaller.SessionCallback> getAllSessionCallbacks()
-
setSessionProgress
public void setSessionProgress(int sessionId, float progress)
-
setSessionActiveState
public void setSessionActiveState(int sessionId, boolean active)
-
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)
-
-