summaryrefslogtreecommitdiffstats
path: root/core/java/android/backup/BackupService.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2009-04-30 12:40:19 -0700
committerChristopher Tate <ctate@google.com>2009-04-30 12:40:19 -0700
commitc114eb55b442981e2ea0a8989aa6ed458fc418e4 (patch)
treece9f75917a625b284ce44a991b846c6cbd788fa1 /core/java/android/backup/BackupService.java
parent021dce4198afbf602109ba5807a193c437b05361 (diff)
downloadframeworks_base-c114eb55b442981e2ea0a8989aa6ed458fc418e4.zip
frameworks_base-c114eb55b442981e2ea0a8989aa6ed458fc418e4.tar.gz
frameworks_base-c114eb55b442981e2ea0a8989aa6ed458fc418e4.tar.bz2
Hide the backup stuff for now
Also adjust based on comments: + changed service intent string to conform to usage guidelines + only publish the IBackupService binder when invoked with the right intent action + docs tweaks
Diffstat (limited to 'core/java/android/backup/BackupService.java')
-rw-r--r--core/java/android/backup/BackupService.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/backup/BackupService.java b/core/java/android/backup/BackupService.java
index 0fee72c..d912d8c 100644
--- a/core/java/android/backup/BackupService.java
+++ b/core/java/android/backup/BackupService.java
@@ -42,7 +42,7 @@ import android.util.Log;
* &lt;/intent-filter&gt;
* &lt;/service&gt;</pre>
*
- * <p><em>Not hidden but API subject to change and should not be published</em>
+ * @hide pending API solidification
*/
public abstract class BackupService extends Service {
@@ -53,7 +53,7 @@ public abstract class BackupService extends Service {
* IntentFilter} that accepts this action.
*/
@SdkConstant(SdkConstantType.SERVICE_ACTION)
- public static final String SERVICE_ACTION = "android.service.action.BACKUP";
+ public static final String SERVICE_ACTION = "android.backup.BackupService";
/**
* The application is being asked to write any data changed since the
@@ -63,7 +63,7 @@ public abstract class BackupService extends Service {
* should perform a full backup. In both cases, a representation of the
* final backup state after this pass should be written to the file pointed
* to by the newStateFd file descriptor.
- *
+ *
* @param oldStateFd An open, read-only file descriptor pointing to the last
* backup state provided by the application. May be negative,
* in which case no prior state is being provided and the
@@ -83,7 +83,7 @@ public abstract class BackupService extends Service {
* provided in the file pointed to by the dataFd file descriptor. Once
* the restore is finished, the application should write a representation
* of the final state to the newStateFd file descriptor,
- *
+ *
* @param dataFd An open, read-only file descriptor pointing to a full snapshot
* of the application's data.
* @param newStateFd An open, read/write file descriptor pointing to an empty
@@ -95,8 +95,15 @@ public abstract class BackupService extends Service {
// ----- Core implementation -----
+ /**
+ * Returns the private interface called by the backup system. Applications will
+ * not typically override this.
+ */
public IBinder onBind(Intent intent) {
- return mBinder;
+ if (intent.getAction().equals(SERVICE_ACTION)) {
+ return mBinder;
+ }
+ return null;
}
private final IBinder mBinder = new BackupServiceBinder().asBinder();