Sequenceablepublic class InstallParam extends Object implements Sequenceable
The parameters include the user ID and installation mode flag.
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
INSTALL_FLAG_DEFAULT |
Indicates the default installation mode.
|
static Sequenceable.Producer<InstallParam> |
PRODUCER |
Creates a
InstallParam instance from a Parcel. |
static int |
UNSPECIFIED_USER_ID |
Indicates the default user ID.
|
| 构造器 | 说明 |
|---|---|
InstallParam() |
A no-argument constructor used to create an
InstallParam instance. |
InstallParam(int userId,
int installFlag) |
A parameterized constructor used to create an
InstallParam instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getInstallFlag() |
Obtains the installation mode flag.
|
int |
getUserId() |
Obtains the user ID.
|
boolean |
isKeepData() |
Is keep user data while uninstall.
|
boolean |
marshalling(Parcel out) |
Writes an
InstallParam object into a Parcel. |
void |
setInstallFlag(int installFlag) |
Sets the installation mode flag.
|
void |
setKeepData(boolean keepData) |
Sets the keep data while uninstall.
|
void |
setUserId(int userId) |
Sets the user ID.
|
boolean |
unmarshalling(Parcel in) |
Reads an
InstallParam object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final int INSTALL_FLAG_DEFAULT
The value is 0.
public static final Sequenceable.Producer<InstallParam> PRODUCER
InstallParam instance from a Parcel.public static final int UNSPECIFIED_USER_ID
The value is -1.
public InstallParam()
InstallParam instance.public InstallParam(int userId,
int installFlag)
InstallParam instance.
The value of installFlag is used to specify the installation mode.
0 indicates the common installation mode. In this mode, an error will be returned if
the package version to be installed for an application is earlier than the existing package version (if any)
.1 indicates the overwrite installation mode. In this mode, the package to be installed
for an application will always replace the existing package (if any) regardless of whether it is an earlier or
later version.userId - Indicates the user ID.installFlag - Identifies the installation mode.public int getUserId()
public void setUserId(int userId)
userId - Indicates the user ID.public int getInstallFlag()
public void setInstallFlag(int installFlag)
installFlag - Indicates the installation mode flag.public boolean isKeepData()
public void setKeepData(boolean keepData)
keepData - Indicates is keep data.public boolean marshalling(Parcel out)
InstallParam object into a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object.true if the InstallParam object has been written into the Parcel;
returns false otherwise.public boolean unmarshalling(Parcel in)
InstallParam object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object.true if the InstallParam object has been read from the Parcel; returns
false otherwise.