public abstract class RestoreObserver extends Object
Constructor and Description |
---|
RestoreObserver() |
Modifier and Type | Method and Description |
---|---|
void |
onUpdate(int nowBeingRestored,
String currentPackage)
An indication of which package is being restored currently, out of the
total number provided in the
restoreStarting(int) callback. |
void |
restoreFinished(int error)
The restore process has completed.
|
void |
restoreSetsAvailable(RestoreSet[] result)
Supply a list of the restore datasets available from the current transport.
|
void |
restoreStarting(int numPackages)
The restore operation has begun.
|
public void restoreSetsAvailable(RestoreSet[] result)
android.app.backup.IRestoreSession.getAvailableRestoreSets
method.result
- An array of RestoreSet
objects
describing all of the available datasets that are candidates for restoring to
the current device. If no applicable datasets exist, result
will be
null
.public void restoreStarting(int numPackages)
numPackages
- The total number of packages being processed in
this restore operation.public void onUpdate(int nowBeingRestored, String currentPackage)
restoreStarting(int)
callback. This method
is not guaranteed to be called: if the transport is unable to obtain
data for one or more of the requested packages, no onUpdate() call will
occur for those packages.nowBeingRestored
- The index, between 1 and the numPackages parameter
to the restoreStarting(int)
callback, of the package now being
restored. This may be non-monotonic; it is intended purely as a rough
indication of the backup manager's progress through the overall restore process.currentPackage
- The name of the package now being restored.public void restoreFinished(int error)
error
- Zero on success; a nonzero error code if the restore operation
as a whole failed.