summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/backup/RestoreObserver.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2010-03-05 15:46:30 -0800
committerChristopher Tate <ctate@google.com>2010-03-05 16:27:15 -0800
commit4528186e0d65fc68ef0dd1941aa2ac8aefcd55a3 (patch)
tree3f1276aef1448aad75a0d44ad1abbbd1478a4937 /core/java/android/app/backup/RestoreObserver.java
parent931bf89d327ecf07301231fd86b17deac535feaa (diff)
downloadframeworks_base-4528186e0d65fc68ef0dd1941aa2ac8aefcd55a3.zip
frameworks_base-4528186e0d65fc68ef0dd1941aa2ac8aefcd55a3.tar.gz
frameworks_base-4528186e0d65fc68ef0dd1941aa2ac8aefcd55a3.tar.bz2
Refactor android.backup => android.app.backup
Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
Diffstat (limited to 'core/java/android/app/backup/RestoreObserver.java')
-rw-r--r--core/java/android/app/backup/RestoreObserver.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/core/java/android/app/backup/RestoreObserver.java b/core/java/android/app/backup/RestoreObserver.java
new file mode 100644
index 0000000..7a5e10b
--- /dev/null
+++ b/core/java/android/app/backup/RestoreObserver.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.backup;
+
+/**
+ * Callback class for receiving progress reports during a restore operation. These
+ * methods will all be called on your application's main thread.
+ */
+public abstract class RestoreObserver {
+ /**
+ * The restore operation has begun.
+ *
+ * @param numPackages The total number of packages being processed in
+ * this restore operation.
+ */
+ void restoreStarting(int numPackages) {
+ }
+
+ /**
+ * An indication of which package is being restored currently, out of the
+ * total number provided in the restoreStarting() callback. This method
+ * is not guaranteed to be called.
+ *
+ * @param nowBeingRestored The index, between 1 and the numPackages parameter
+ * to the restoreStarting() callback, of the package now being restored.
+ */
+ void onUpdate(int nowBeingRestored) {
+ }
+
+ /**
+ * The restore operation has completed.
+ *
+ * @param error Zero on success; a nonzero error code if the restore operation
+ * as a whole failed.
+ */
+ void restoreFinished(int error) {
+ }
+}