summaryrefslogtreecommitdiff
path: root/core/java/android/app/IApplicationThread.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2009-05-14 11:12:14 -0700
committerChristopher Tate <ctate@google.com>2009-05-31 13:10:03 -0700
commit181fafaf48208978b8ba2022683ffa78aaeddde1 (patch)
tree7c062847d418415e28813e70aac53c8c47e4ff69 /core/java/android/app/IApplicationThread.java
parentc01159bb00f7273f9b051dfbbe6bc10d54d3a846 (diff)
Retool the backup process to use a new 'BackupAgent' class
Backups will be handled by launching the application in a special mode under which no activities or services will be started, only the BackupAgent subclass named in the app's android:backupAgent manifest property. This takes the place of the BackupService class used earlier during development. In the cases of *full* backup or restore, an application that does not supply its own BackupAgent will be launched in a restricted manner; in particular, it will be using the default Application class rather than any manifest-declared one. This ensures that the app is not running any code that may try to manipulate its data while the backup system reads/writes its data set.
Diffstat (limited to 'core/java/android/app/IApplicationThread.java')
-rw-r--r--core/java/android/app/IApplicationThread.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index ec03d3a1f1f5..bca1fea150d4 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -59,6 +59,11 @@ public interface IApplicationThread extends IInterface {
int configChanges) throws RemoteException;
void scheduleReceiver(Intent intent, ActivityInfo info, int resultCode,
String data, Bundle extras, boolean sync) throws RemoteException;
+ static final int BACKUP_MODE_INCREMENTAL = 0;
+ static final int BACKUP_MODE_FULL = 1;
+ static final int BACKUP_MODE_RESTORE = 2;
+ void scheduleCreateBackupAgent(ApplicationInfo app, int backupMode) throws RemoteException;
+ void scheduleDestroyBackupAgent(ApplicationInfo app) throws RemoteException;
void scheduleCreateService(IBinder token, ServiceInfo info) throws RemoteException;
void scheduleBindService(IBinder token,
Intent intent, boolean rebind) throws RemoteException;
@@ -71,8 +76,8 @@ public interface IApplicationThread extends IInterface {
static final int DEBUG_WAIT = 2;
void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers,
ComponentName testName, String profileName, Bundle testArguments,
- IInstrumentationWatcher testWatcher, int debugMode, Configuration config, Map<String,
- IBinder> services) throws RemoteException;
+ IInstrumentationWatcher testWatcher, int debugMode, boolean restrictedBackupMode,
+ Configuration config, Map<String, IBinder> services) throws RemoteException;
void scheduleExit() throws RemoteException;
void requestThumbnail(IBinder token) throws RemoteException;
void scheduleConfigurationChanged(Configuration config) throws RemoteException;
@@ -119,4 +124,6 @@ public interface IApplicationThread extends IInterface {
int REQUEST_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
int PROFILER_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27;
int SET_SCHEDULING_GROUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28;
+ int SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29;
+ int SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+30;
}