OSDN Git Service

BackupAgent-related lifecycle APIs need to be oneway
authorChristopher Tate <ctate@android.com>
Thu, 23 Jul 2009 21:40:13 +0000 (14:40 -0700)
committerChristopher Tate <ctate@android.com>
Thu, 23 Jul 2009 21:40:13 +0000 (14:40 -0700)
Bad Things(tm) happen if some of the lifecycle interfaces on IActivityThread are
oneway but others are not [notably, out-of-order method delivery, i.e.
catastrophe].  This change makes the methods added for backup-agent management
oneway like the rest of the API.

core/java/android/app/ApplicationThreadNative.java

index a3c6325..5335239 100644 (file)
@@ -524,7 +524,8 @@ class ApplicationThreadProxy implements IApplicationThread {
         data.writeInterfaceToken(IApplicationThread.descriptor);
         app.writeToParcel(data, 0);
         data.writeInt(backupMode);
-        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null, 0);
+        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null,
+                IBinder.FLAG_ONEWAY);
         data.recycle();
     }
 
@@ -532,7 +533,8 @@ class ApplicationThreadProxy implements IApplicationThread {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         app.writeToParcel(data, 0);
-        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null, 0);
+        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null,
+                IBinder.FLAG_ONEWAY);
         data.recycle();
     }