summaryrefslogtreecommitdiffstats
path: root/core/java/android/backup/BackupManager.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2009-06-08 15:24:01 -0700
committerChristopher Tate <ctate@google.com>2009-06-08 16:01:24 -0700
commit9b3905c4a25f2d785ce7535d1f2e1540b46bb561 (patch)
tree5a83d5f1c545317b3a087c2181b36f03f60cd790 /core/java/android/backup/BackupManager.java
parentb2df1699c996e62baa78877978cd2c5607ea4194 (diff)
downloadframeworks_base-9b3905c4a25f2d785ce7535d1f2e1540b46bb561.zip
frameworks_base-9b3905c4a25f2d785ce7535d1f2e1540b46bb561.tar.gz
frameworks_base-9b3905c4a25f2d785ce7535d1f2e1540b46bb561.tar.bz2
Revamp IRestoreSession a bit
We now supply an array of RestoreSet objects instead of wacky Bundle shenanigans. Also, pushed beginRestoreSession() out to the BackupManager concrete interface class so that SetupWizard can use it. (beginRestoreSession() is @hide, non-privileged apps cannot use it. It's also guarded by android.permission.BACKUP enforcement.)
Diffstat (limited to 'core/java/android/backup/BackupManager.java')
-rw-r--r--core/java/android/backup/BackupManager.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/core/java/android/backup/BackupManager.java b/core/java/android/backup/BackupManager.java
index 30f781e..c3b6a02 100644
--- a/core/java/android/backup/BackupManager.java
+++ b/core/java/android/backup/BackupManager.java
@@ -32,8 +32,9 @@ import android.os.ServiceManager;
* until the backup operation actually occurs.
*
* <p>The backup operation itself begins with the system launching the
- * {@link BackupService} subclass declared in your manifest. See the documentation
- * for {@link BackupService} for a detailed description of how the backup then proceeds.
+ * {@link android.app.BackupAgent} subclass declared in your manifest. See the
+ * documentation for {@link android.app.BackupAgent} for a detailed description
+ * of how the backup then proceeds.
*
* @hide pending API solidification
*/
@@ -64,7 +65,7 @@ public class BackupManager {
/**
* Notifies the Android backup system that your application wishes to back up
* new changes to its data. A backup operation using your application's
- * {@link BackupService} subclass will be scheduled when you call this method.
+ * {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
*/
public void dataChanged() {
try {
@@ -72,4 +73,20 @@ public class BackupManager {
} catch (RemoteException e) {
}
}
+
+ /**
+ * Begin the process of restoring system data from backup. This method requires
+ * that the application hold the "android.permission.BACKUP" permission, and is
+ * not public.
+ *
+ * {@hide}
+ */
+ public IRestoreSession beginRestoreSession(int transportID) {
+ IRestoreSession binder = null;
+ try {
+ binder = mService.beginRestoreSession(transportID);
+ } catch (RemoteException e) {
+ }
+ return binder;
+ }
}