IInstallerCallback, IRemoteBroker, IRemoteObjectpublic abstract class InstallerCallback extends RemoteObject implements IInstallerCallback
This abstract class implements the IInstallerCallback interface.
IRemoteObject.DeathRecipientDUMP_TRANSACTION, INTERFACE_TRANSACTION, MAX_TRANSACTION_ID, MIN_TRANSACTION_ID, PING_TRANSACTION| 构造器 | 说明 |
|---|---|
InstallerCallback() |
A constructor used to create an
InstallerCallback. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
IRemoteObject |
asObject() |
Obtains the current object.
|
abstract void |
onFinished(int status,
String statusMessage) |
Called when a bundle is installed or uninstalled.
|
boolean |
onRemoteRequest(int code,
MessageParcel data,
MessageParcel reply,
MessageOption option) |
Sets an entry for receiving requests.
|
public InstallerCallback()
InstallerCallback.public boolean onRemoteRequest(int code,
MessageParcel data,
MessageParcel reply,
MessageOption option)
throws RemoteException
RemoteObjectThis method is implemented by the remote service provider. You need to override this method with your own service logic when you are using IPC.
onRemoteRequest 在类中 RemoteObjectcode - Indicates the service request code sent from the peer end.data - Indicates the MessageParcel object sent from the peer end.reply - Indicates the response message object sent from the remote service.
The local service writes the response data to the MessageParcel object.option - Indicates whether the operation is synchronous or asynchronous.true if the operation succeeds; returns false otherwise.RemoteException - Throws this exception if a remote service error occurs.RemoteObject.onRemoteRequest(int, MessageParcel, MessageParcel, MessageOption)public IRemoteObject asObject()
asObject 在接口中 IRemoteBrokerpublic abstract void onFinished(int status,
String statusMessage)
onFinished 在接口中 IInstallerCallbackstatus - Indicates the bundle status.statusMessage - Indicates details about the bundle status.RemoteException - Throws this exception if the system failed to obtain the bundle manager service.IBundleInstaller.SUCCESS,
IBundleInstaller.STATUS_INSTALL_FAILURE,
IBundleInstaller.STATUS_INSTALL_FAILURE_ABORTED,
IBundleInstaller.STATUS_INSTALL_FAILURE_CONFLICT,
IBundleInstaller.STATUS_INSTALL_FAILURE_INCOMPATIBLE,
IBundleInstaller.STATUS_INSTALL_FAILURE_INVALID,
IBundleInstaller.STATUS_INSTALL_FAILURE_STORAGE,
IBundleInstaller.STATUS_UNINSTALL_FAILURE,
IBundleInstaller.STATUS_UNINSTALL_FAILURE_ABORTED,
IBundleInstaller.STATUS_UNINSTALL_FAILURE_BLOCKED,
IBundleInstaller.STATUS_UNINSTALL_FAILURE_CONFLICT,
IBundleInstaller.STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT,
IBundleInstaller.STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED