summaryrefslogtreecommitdiffstats
path: root/core/java/android/backup
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/backup')
-rw-r--r--core/java/android/backup/BackupManager.java6
-rw-r--r--core/java/android/backup/IBackupManager.aidl16
2 files changed, 18 insertions, 4 deletions
diff --git a/core/java/android/backup/BackupManager.java b/core/java/android/backup/BackupManager.java
index 6f0b2ee..30f781e 100644
--- a/core/java/android/backup/BackupManager.java
+++ b/core/java/android/backup/BackupManager.java
@@ -42,6 +42,12 @@ public class BackupManager {
private IBackupManager mService;
/**
+ * Defined backup transports understood by {@link IBackupManager.selectBackupTransport}.
+ */
+ public static final int TRANSPORT_ADB = 1;
+ public static final int TRANSPORT_GOOGLE = 2;
+
+ /**
* Constructs a BackupManager object through which the application can
* communicate with the Android backup system.
*
diff --git a/core/java/android/backup/IBackupManager.aidl b/core/java/android/backup/IBackupManager.aidl
index 3468d70..f5b82fe 100644
--- a/core/java/android/backup/IBackupManager.aidl
+++ b/core/java/android/backup/IBackupManager.aidl
@@ -36,20 +36,28 @@ interface IBackupManager {
/**
* Notifies the Backup Manager Service that an agent has become available. This
* method is only invoked by the Activity Manager.
- * !!! TODO: permission
*/
oneway void agentConnected(String packageName, IBinder agent);
/**
* Notify the Backup Manager Service that an agent has unexpectedly gone away.
* This method is only invoked by the Activity Manager.
- * !!! TODO: permission
*/
oneway void agentDisconnected(String packageName);
/**
- * Schedule a full backup of the given package.
- * !!! TODO: permission
+ * Schedule a full backup of the given package. Callers must hold the
+ * android.permission.BACKUP permission to use this method.
*/
oneway void scheduleFullBackup(String packageName);
+
+ /**
+ * Specify a default backup transport. Callers must hold the
+ * android.permission.BACKUP permission to use this method.
+ *
+ * @param transportID The ID of the transport to select. This should be one
+ * of {@link BackupManager.TRANSPORT_GOOGLE} or {@link BackupManager.TRANSPORT_ADB}.
+ * @return The ID of the previously selected transport.
+ */
+ int selectBackupTransport(int transportID);
}