OSDN Git Service

API CHANGE: rename BackupHelperAgent => BackupAgentHelper per API Council
authorChristopher Tate <ctate@google.com>
Mon, 29 Mar 2010 21:54:02 +0000 (14:54 -0700)
committerChristopher Tate <ctate@google.com>
Mon, 29 Mar 2010 22:48:14 +0000 (15:48 -0700)
Part of bug #2545514

Change-Id: Ic775e3b942c485252149c1b6c15c88517fa4e3e5

api/current.xml
core/java/android/app/backup/BackupAgent.java
core/java/android/app/backup/BackupAgentHelper.java [moved from core/java/android/app/backup/BackupHelperAgent.java with 93% similarity]
core/java/android/app/backup/BackupHelper.java
core/java/android/app/backup/BackupManager.java
core/java/android/app/backup/FileBackupHelper.java
core/java/android/app/backup/SharedPreferencesBackupHelper.java
packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
services/java/com/android/server/SystemBackupAgent.java
tests/backup/src/com/android/backuptest/BackupTestAgent.java

index bbed4fd..5609a63 100644 (file)
 </exception>
 </method>
 </class>
+<class name="BackupAgentHelper"
+ extends="android.app.backup.BackupAgent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackupAgentHelper"
+ type="android.app.backup.BackupAgentHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addHelper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyPrefix" type="java.lang.String">
+</parameter>
+<parameter name="helper" type="android.app.backup.BackupHelper">
+</parameter>
+</method>
+<method name="onBackup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="onRestore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInput">
+</parameter>
+<parameter name="appVersionCode" type="int">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
 <class name="BackupDataInput"
  extends="java.lang.Object"
  abstract="false"
 </parameter>
 </method>
 </interface>
-<class name="BackupHelperAgent"
- extends="android.app.backup.BackupAgent"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="BackupHelperAgent"
- type="android.app.backup.BackupHelperAgent"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="addHelper"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="keyPrefix" type="java.lang.String">
-</parameter>
-<parameter name="helper" type="android.app.backup.BackupHelper">
-</parameter>
-</method>
-<method name="onBackup"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="oldState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<parameter name="data" type="android.app.backup.BackupDataOutput">
-</parameter>
-<parameter name="newState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-</method>
-<method name="onRestore"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="data" type="android.app.backup.BackupDataInput">
-</parameter>
-<parameter name="appVersionCode" type="int">
-</parameter>
-<parameter name="newState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-</method>
-</class>
 <class name="BackupManager"
  extends="java.lang.Object"
  abstract="false"
index d0cb148..f9dcab8 100644 (file)
@@ -37,7 +37,7 @@ import java.io.IOException;
  * respectively.
  * <p>
  * A backup agent based on convenient helper classes is available in
- * {@link android.app.backup.BackupHelperAgent} for less complex implementation
+ * {@link android.app.backup.BackupAgentHelper} for less complex implementation
  * requirements.
  * <p>
  * STOPSHIP write more documentation about the backup process here.
@@ -27,12 +27,12 @@ import java.io.IOException;
  * backup agent. Then, within the agent's onBackup() and onRestore() methods, it
  * will call {@link #addHelper(String, BackupHelper)} one or more times to
  * specify the data sets, then invoke super.onBackup() or super.onRestore() to
- * have the BackupHelperAgent implementation process the data.
+ * have the BackupAgentHelper implementation process the data.
  * <p>
  * STOPSHIP: document!
  */
-public class BackupHelperAgent extends BackupAgent {
-    static final String TAG = "BackupHelperAgent";
+public class BackupAgentHelper extends BackupAgent {
+    static final String TAG = "BackupAgentHelper";
 
     BackupHelperDispatcher mDispatcher = new BackupHelperDispatcher();
 
index dca2388..b7ef268 100644 (file)
@@ -20,7 +20,7 @@ import android.os.ParcelFileDescriptor;
 
 /**
  * A convenient interface to be used with the
- * {@link android.app.backup.BackupHelperAgent} to implement backup and restore of
+ * {@link android.app.backup.BackupAgentHelper} to implement backup and restore of
  * arbitrary data types.
  * <p>
  * STOPSHOP: document!
@@ -36,7 +36,8 @@ public interface BackupHelper {
             ParcelFileDescriptor newState);
 
     /**
-     * Called by BackupHelperAgent to restore one entity from the restore dataset.
+     * Called by {@link android.app.backup.BackupAgentHelper BackupAgentHelper}
+     * to restore one entity from the restore dataset.
      * <p class=note>
      * Do not close the <code>data</code> stream.  Do not read more than
      * <code>data.size()</code> bytes from <code>data</code>.
@@ -44,7 +45,8 @@ public interface BackupHelper {
     public void restoreEntity(BackupDataInputStream data);
 
     /**
-     * Called by BackupHelperAgent to write the new backup state file corresponding to
+     * Called by {@link android.app.backup.BackupAgentHelper BackupAgentHelper}
+     * to write the new backup state file corresponding to
      * the current state of the app's data at the time the backup operation was
      * performed.
      */
index dff0695..7eb6265 100644 (file)
@@ -41,7 +41,7 @@ import android.util.Log;
  * of how the backup then proceeds.
  * <p>
  * A simple implementation of a BackupAgent useful for backing up Preferences
- * and files is available by using {@link android.app.backup.BackupHelperAgent}.
+ * and files is available by using {@link android.app.backup.BackupAgentHelper}.
  * <p>
  * STOPSHIP: more documentation!
  * <p>
index b42049e..3ce5b43 100644 (file)
@@ -24,7 +24,7 @@ import java.io.File;
 
 /**
  * A helper class which can be used in conjunction with
- * {@link android.app.backup.BackupHelperAgent} to manage the backup of a set of
+ * {@link android.app.backup.BackupAgentHelper} to manage the backup of a set of
  * files. Whenever backup is performed, all files changed since the last backup
  * will be saved in their entirety. During the first time the backup happens,
  * all the files in the list will be backed up. Note that this should only be
@@ -69,7 +69,7 @@ public class FileBackupHelper extends FileBackupHelperBase implements BackupHelp
      * now. When <code>oldState</code> is <code>null</code>, all the files will
      * be backed up.
      * <p>
-     * This should be called from {@link android.app.backup.BackupHelperAgent}
+     * This should be called from {@link android.app.backup.BackupAgentHelper}
      * directly. See
      * {@link android.app.backup.BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)}
      * for a description of parameter meanings.
index d35b10c..f9e6b28 100644 (file)
@@ -25,7 +25,7 @@ import java.io.File;
 
 /**
  * A helper class which can be used in conjunction with
- * {@link android.app.backup.BackupHelperAgent} to manage the backup of
+ * {@link android.app.backup.BackupAgentHelper} to manage the backup of
  * {@link android.content.SharedPreferences}. Whenever backup is performed it
  * will back up all named shared preferences which have changed since the last
  * backup.
index d5c9855..b98071e 100644 (file)
@@ -32,7 +32,7 @@ import java.util.zip.CRC32;
 
 import android.app.backup.BackupDataInput;
 import android.app.backup.BackupDataOutput;
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.content.ContentValues;
 import android.content.Context;
 import android.database.Cursor;
@@ -49,7 +49,7 @@ import android.util.Log;
  * Performs backup and restore of the System and Secure settings.
  * List of settings that are backed up are stored in the Settings.java file
  */
-public class SettingsBackupAgent extends BackupHelperAgent {
+public class SettingsBackupAgent extends BackupAgentHelper {
     private static final boolean DEBUG = false;
 
     private static final String KEY_SYSTEM = "system";
index 86b9df6..fff1874 100644 (file)
@@ -21,7 +21,7 @@ import android.app.backup.BackupDataInput;
 import android.app.backup.BackupDataInputStream;
 import android.app.backup.BackupDataOutput;
 import android.app.backup.BackupHelper;
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.content.Context;
 import android.os.ParcelFileDescriptor;
 import android.os.ServiceManager;
@@ -34,7 +34,7 @@ import java.io.IOException;
 /**
  * Backup agent for various system-managed data, currently just the system wallpaper
  */
-public class SystemBackupAgent extends BackupHelperAgent {
+public class SystemBackupAgent extends BackupAgentHelper {
     private static final String TAG = "SystemBackupAgent";
 
     // These paths must match what the WallpaperManagerService uses
index 3fdd96b..edc54a4 100644 (file)
 
 package com.android.backuptest;
 
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.app.backup.FileBackupHelper;
 import android.app.backup.SharedPreferencesBackupHelper;
 
-public class BackupTestAgent extends BackupHelperAgent
+public class BackupTestAgent extends BackupAgentHelper
 {
     public void onCreate() {
         addHelper("data_files", new FileBackupHelper(this, BackupTestActivity.FILE_NAME));