Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d884f43f authored by Christopher Tate's avatar Christopher Tate
Browse files

BackupAgent-related lifecycle APIs need to be oneway

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.
parent 11939657
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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();
    }