@Implements(value=android.content.pm.PackageInstaller.class, minSdk=21) public class ShadowPackageInstaller extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ShadowPackageInstaller.ShadowSession |
Constructor | Description |
---|---|
ShadowPackageInstaller() |
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.
|
@Implementation protected List<PackageInstaller.SessionInfo> getAllSessions()
@Implementation protected List<PackageInstaller.SessionInfo> getMySessions()
@Implementation protected void registerSessionCallback(PackageInstaller.SessionCallback callback, Handler handler)
@Implementation protected PackageInstaller.SessionInfo getSessionInfo(int sessionId)
@Implementation protected int createSession(PackageInstaller.SessionParams params) throws IOException
IOException
@Implementation protected void abandonSession(int sessionId)
@Implementation protected PackageInstaller.Session openSession(int sessionId) throws IOException
IOException
public void setSessionProgress(int sessionId, float progress)
@Deprecated public void setSessionSucceeds(int sessionId)
PackageInstaller.Session.commit(IntentSender)
public void setSessionFails(int sessionId)