public class PackageInstallerException
extends java.lang.RuntimeException
| Modifier and Type | Field and Description |
|---|---|
static int |
ALREADY_INSTALLED
The application is already installed.
|
static int |
APK_NOT_CURRENT_APP
Apk is not the appropriate to upgrade the current application.
|
static int |
APK_NOT_FOUND
App not found.
|
static int |
EMPTY_LIST
The passed list is empty.
|
int |
error_number
The error number returned by the Installer's system services.
|
static int |
FAILURE
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE.
|
static int |
FAILURE_ABORTED
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_ABORTED.
|
static int |
FAILURE_BLOCKED
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_BLOCKED.
|
static int |
FAILURE_CONFLICT
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_CONFLICT.
|
static int |
FAILURE_INCOMPATIBLE
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_INCOMPATIBLE.
|
static int |
FAILURE_INVALID
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_INVALID.
|
static int |
FAILURE_STORAGE
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_STORAGE.
|
static int |
GENERIC_ERROR
Generic error, mostly due to a wrong parameter passed to a SDK method.
|
static int |
INSTALLER_SERVICE_ERROR
Installer Service error.
|
static int |
INVALID_PATH
The apk file doesn't exist.
|
static int |
IO_ERROR
IO exception.
|
static int |
NOT_INSTALLED
The application is not installed.
|
static int |
NULL_POINTER_ERROR
Null pointer error.
|
static int |
PENDING_USER_ACTION
The commit has been refused with android.content.pm.PackageInstaller.STATUS_PENDING_USER_ACTION.
|
static int |
REMOTE_CALL_ERROR
It's not possible to call the remote service.
|
static int |
SECURITY_ERROR
Security exception.
|
static int |
SESSION_PARAM_ERROR
IllegalArgumentException exception.
|
static int |
SESSION_WRONG_STATE
Wrong sequence of call on a PackageInstallerSession.
|
static int |
SUCCESS
Success constant.
|
static int |
UNBOUND_SERVICE
Remote service not bound.
|
static int |
UNKNOWN_ERROR
The commit has been refused with android.content.pm.PackageInstaller.STATUS_FAILURE_INCOMPATIBLE.
|
static int |
UPGRADE_VERSION_ERROR
The installed version is higher than that of the .apk intended for the upgrade.
|
| Constructor and Description |
|---|
PackageInstallerException()
Constructs an PackageInstallerException object.
|
PackageInstallerException(int number)
Constructs an PackageInstallerException object that takes a
int parameter containing the reason the exception was
thrown. |
PackageInstallerException(java.lang.String s)
Constructs an GENERIC_ERROR PackageInstallerException object.
|
PackageInstallerException(java.lang.String s,
int number)
Constructs an PackageInstallerException object that takes a
int parameter containing the reason the exception was
thrown. |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
stringifyCode(int number) |
public static final int SUCCESS
public static final int INSTALLER_SERVICE_ERROR
public static final int NULL_POINTER_ERROR
public static final int GENERIC_ERROR
public static final int REMOTE_CALL_ERROR
public static final int ALREADY_INSTALLED
public static final int INVALID_PATH
public static final int IO_ERROR
public static final int SECURITY_ERROR
public static final int SESSION_PARAM_ERROR
public static final int NOT_INSTALLED
public static final int EMPTY_LIST
public static final int UPGRADE_VERSION_ERROR
public static final int PENDING_USER_ACTION
public static final int FAILURE
public static final int FAILURE_BLOCKED
public static final int FAILURE_CONFLICT
public static final int FAILURE_INCOMPATIBLE
public static final int FAILURE_INVALID
public static final int FAILURE_STORAGE
public static final int FAILURE_ABORTED
public static final int UNKNOWN_ERROR
public static final int APK_NOT_FOUND
public static final int UNBOUND_SERVICE
public static final int APK_NOT_CURRENT_APP
public static final int SESSION_WRONG_STATE
public int error_number
public PackageInstallerException()
public PackageInstallerException(java.lang.String s)
String parameter is concatenated to the exception message.s - String String concatenated to the error message.public PackageInstallerException(java.lang.String s,
int number)
int parameter containing the reason the exception was
thrown. The String prameter is concatenated to the exception message.s - String String concatenated to the error message.number - int indicating the error code number.public PackageInstallerException(int number)
int parameter containing the reason the exception was
thrown.number - int indicating the error code number.