API CHANGE: rename BackupHelperAgent => BackupAgentHelper per API Council

Part of bug #2545514

Change-Id: Ic775e3b942c485252149c1b6c15c88517fa4e3e5
This commit is contained in:
Christopher Tate
2010-03-29 14:54:02 -07:00
parent 89d4e2dd78
commit cc84c69726
10 changed files with 89 additions and 87 deletions

View File

@@ -27075,6 +27075,76 @@
</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"
@@ -27324,76 +27394,6 @@
</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"

View 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.

View File

@@ -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();

View 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.
*/

View 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>

View 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.

View 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.

View 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";

View 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

View File

@@ -16,11 +16,11 @@
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));