Fix clearApplicationUserData() to allow a null observer

The services themselves already handle 'null' to mean "no observer";
it was just the non-AIDL marshalling code that wasn't doing the
right thing.

Bug 9588299

Change-Id: I99e26cd207f91e8060d9fc113aef90a106640b64
This commit is contained in:
Christopher Tate
2013-09-09 14:17:27 -07:00
parent e6a01f3793
commit 31b65f9aa1

View File

@@ -3377,7 +3377,7 @@ class ActivityManagerProxy implements IActivityManager
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(packageName);
data.writeStrongBinder(observer.asBinder());
data.writeStrongBinder((observer != null) ? observer.asBinder() : null);
data.writeInt(userId);
mRemote.transact(CLEAR_APP_DATA_TRANSACTION, data, reply, 0);
reply.readException();