From b83a283ac178ab0a72f1d811189d79b26097835e Mon Sep 17 00:00:00 2001
From: Scott Main
Date: Thu, 29 Apr 2010 13:26:53 -0700
Subject: [PATCH] docs: add dev guide for backup
Change-Id: I168f6b15d3441c9cbea2cd9699612476c7244530
---
core/java/android/app/backup/BackupAgent.java | 7 +-
core/java/android/app/backup/package.html | 27 +-
docs/html/guide/guide_toc.cs | 12 +-
docs/html/guide/topics/data/backup.jd | 761 ++++++++++++++++++
4 files changed, 791 insertions(+), 16 deletions(-)
create mode 100644 docs/html/guide/topics/data/backup.jd
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index 5245da5023d9d..cb4e0e7840031 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -162,9 +162,10 @@ public abstract class BackupAgent extends ContextWrapper {
* file descriptor pointing to a full snapshot of the
* application's data. The application should consume every
* entity represented in this data stream.
- * @param appVersionCode The
- * {@link android.R.styleable#AndroidManifest_versionCode android:versionCode}
- * value of the application that backed up this particular data set. This
+ * @param appVersionCode The value of the {@code
+ * android:versionCode} manifest attribute,
+ * from the application that backed up this particular data set. This
* makes it possible for an application's agent to distinguish among any
* possible older data versions when asked to perform the restore
* operation.
diff --git a/core/java/android/app/backup/package.html b/core/java/android/app/backup/package.html
index e2518ec56c5b6..ae29994ab5a9b 100644
--- a/core/java/android/app/backup/package.html
+++ b/core/java/android/app/backup/package.html
@@ -2,23 +2,28 @@
Contains the backup and restore functionality available to
applications. If a user wipes the data on their device or upgrades to a new Android-powered
-device, all applications that have enabled backup will restore the user's previous data and/or
-preferences. {@more} All backup management is controlled through
-{@link android.app.backup.BackupManager}. Individual backup functionality is
-implemented through a subclass {@link android.app.backup.BackupAgent} and a
-simple and easy-to-use implementation is provided in
-{@link android.app.backup.BackupAgentHelper}.
+device, all applications that have enabled backup will restore the user's previous data.
+{@more}
-STOPSHIP: add more documentation and remove Dev Guide link if not written!
+All backup and restore operations are controlled by the {@link
+android.app.backup.BackupManager}. Each application that would
+like to enable backup and preserve its data on remote strage must implement a
+backup agent. A backup agent can be built by extending either {@link android.app.backup.BackupAgent}
+or {@link android.app.backup.BackupAgentHelper}. The {@link
+android.app.backup.BackupAgentHelper} class provides a wrapper around {@link
+android.app.backup.BackupAgent} that simplifies the procedures to implement a backup agent by
+employing backup helpers such as {@link android.app.backup.SharedPreferencesBackupHelper} and
+{@link android.app.backup.FileBackupHelper}.
The backup APIs let applications:
- - Perform backup of arbitrary data
- - Easily perform backup of Preferences and files
- - Handle restore of data
+ - Perform backup of arbitrary data to remote storage
+ - Easily perform backup of {@link android.content.SharedPreferences} and files
+ - Restore the data saved to remote storage
For a detailed guide to using the backup APIs, see the Backup Dev Guide topic.
+href="{@docRoot}guide/topics/data/backup.html">Data Backup developer guide.
+