IBackupAgentpublic interface IBackupAgent implements android.os.IInterfaceInterface presented by applications being asked to participate in the
backup & restore mechanism. End user code will not typically implement
this interface directly; they subclass BackupAgent instead.
{@hide} |
Methods Summary |
---|
public void | doBackup(android.os.ParcelFileDescriptor oldState, android.os.ParcelFileDescriptor data, android.os.ParcelFileDescriptor newState, int token, android.app.backup.IBackupManager callbackBinder)Request that the app perform an incremental backup.
| public void | doFullBackup(android.os.ParcelFileDescriptor data, int token, android.app.backup.IBackupManager callbackBinder)Perform a "full" backup to the given file descriptor. The output file is presumed
to be a socket or other non-seekable, write-only data sink. When this method is
called, the app should write all of its files to the output.
| public void | doRestore(android.os.ParcelFileDescriptor data, int appVersionCode, android.os.ParcelFileDescriptor newState, int token, android.app.backup.IBackupManager callbackBinder)Restore an entire data snapshot to the application.
| public void | doRestoreFile(android.os.ParcelFileDescriptor data, long size, int type, java.lang.String domain, java.lang.String path, long mode, long mtime, int token, android.app.backup.IBackupManager callbackBinder)Restore a single "file" to the application. The file was typically obtained from
a full-backup dataset. The agent reads 'size' bytes of file content
from the provided file descriptor.
| public void | doRestoreFinished(int token, android.app.backup.IBackupManager callbackBinder)Provide the app with a canonical "all data has been delivered" end-of-restore
callback so that it can do any postprocessing of the restored data that might
be appropriate. This is issued after both key/value and full data restore
operations have completed.
| public void | fail(java.lang.String message)Out of band: instruct the agent to crash within the client process. This is used
when the backup infrastructure detects a semantic error post-hoc and needs to
pass the problem back to the app.
|
|