Added in API level 8

RestoreObserver


public abstract class RestoreObserver
extends Object

java.lang.Object
   ↳ android.app.backup.RestoreObserver


Callback class for receiving progress reports during a restore operation. These methods will all be called on your application's main thread.

Summary

Public constructors

RestoreObserver()

Public methods

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 restoreStarting(int numPackages)

The restore operation has begun.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

RestoreObserver

public RestoreObserver ()

Public methods

onUpdate

Added in API level 8
public 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. 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.

Parameters
nowBeingRestored int: 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 String: The name of the package now being restored.

restoreFinished

Added in API level 8
public void restoreFinished (int error)

The restore process has completed. This method will always be called, even if no individual package restore operations were attempted.

Parameters
error int: Zero on success; a nonzero error code if the restore operation as a whole failed.

restoreStarting

Added in API level 8
public void restoreStarting (int numPackages)

The restore operation has begun.

Parameters
numPackages int: The total number of packages being processed in this restore operation.