diff options
author | Christopher Tate <ctate@google.com> | 2010-01-25 19:37:47 -0800 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2010-01-25 19:41:23 -0800 |
commit | 80202c8cb8c8e4ab507079e79b864c61a8eeeee9 (patch) | |
tree | 517c775feb878d11f2e10eec0074907cea724574 /services | |
parent | da77d0a6e7fe70b7da229077039bcca1f232bd89 (diff) | |
download | frameworks_base-80202c8cb8c8e4ab507079e79b864c61a8eeeee9.zip frameworks_base-80202c8cb8c8e4ab507079e79b864c61a8eeeee9.tar.gz frameworks_base-80202c8cb8c8e4ab507079e79b864c61a8eeeee9.tar.bz2 |
Move towards a formal public API for backup and restore
This commit makes a few changes towards establishing a formal application
interface for interacting with the backup/restore mechanism:
1. Introduce public wrapper classes around the various binder interfaces; 3rd
party code will never see the binders directly.
2. Progress update callbacks during a restore sequence now occur on the main
thread, not in a binder thread [and not with system-process permissions!].
3. Rename the BackupManagerService's inner "RestoreSession" class to avoid
ambiguity with the new public "RestoreSession" class.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/BackupManagerService.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index 2e45512..72e26f8 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -161,7 +161,7 @@ class BackupManagerService extends IBackupManager.Stub { = new HashMap<String,IBackupTransport>(); String mCurrentTransport; IBackupTransport mLocalTransport, mGoogleTransport; - RestoreSession mActiveRestoreSession; + ActiveRestoreSession mActiveRestoreSession; class RestoreParams { public IBackupTransport transport; @@ -2068,20 +2068,20 @@ class BackupManagerService extends IBackupManager.Stub { Log.d(TAG, "Restore session requested but one already active"); return null; } - mActiveRestoreSession = new RestoreSession(transport); + mActiveRestoreSession = new ActiveRestoreSession(transport); } return mActiveRestoreSession; } // ----- Restore session ----- - class RestoreSession extends IRestoreSession.Stub { + class ActiveRestoreSession extends IRestoreSession.Stub { private static final String TAG = "RestoreSession"; private IBackupTransport mRestoreTransport = null; RestoreSet[] mRestoreSets = null; - RestoreSession(String transport) { + ActiveRestoreSession(String transport) { mRestoreTransport = getTransport(transport); } |