@Implements(value=android.content.pm.PackageInstaller.class, minSdk=21) public class ShadowPackageInstaller extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ShadowPackageInstaller.ShadowSession |
Constructor and Description |
---|
ShadowPackageInstaller() |
Modifier and Type | Method and Description |
---|---|
protected void |
abandonSession(int sessionId) |
protected int |
createSession(android.content.pm.PackageInstaller.SessionParams params) |
protected java.util.List<android.content.pm.PackageInstaller.SessionInfo> |
getAllSessions() |
protected android.content.pm.PackageInstaller.SessionInfo |
getSessionInfo(int sessionId) |
protected android.content.pm.PackageInstaller.Session |
openSession(int sessionId) |
protected void |
registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback callback,
android.os.Handler handler) |
void |
setSessionFails(int sessionId) |
void |
setSessionProgress(int sessionId,
float progress) |
void |
setSessionSucceeds(int sessionId)
Deprecated.
|
@Implementation protected java.util.List<android.content.pm.PackageInstaller.SessionInfo> getAllSessions()
@Implementation protected void registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback callback, android.os.Handler handler)
@Implementation protected android.content.pm.PackageInstaller.SessionInfo getSessionInfo(int sessionId)
@Implementation protected int createSession(android.content.pm.PackageInstaller.SessionParams params) throws java.io.IOException
java.io.IOException
@Implementation protected void abandonSession(int sessionId)
@Implementation protected android.content.pm.PackageInstaller.Session openSession(int sessionId) throws java.io.IOException
java.io.IOException
public void setSessionProgress(int sessionId, float progress)
@Deprecated public void setSessionSucceeds(int sessionId)
Prefer instead to use the Android APIs to close the session PackageInstaller.Session.commit(IntentSender)
public void setSessionFails(int sessionId)