Merge "binder: race condition by parcel finalize"
This commit is contained in:
@@ -547,7 +547,8 @@ public final class BinderProxy implements IBinder {
|
||||
}
|
||||
|
||||
try {
|
||||
return transactNative(code, data, reply, flags);
|
||||
boolean replyOwnsNative = (reply == null) ? false : reply.ownsNativeParcelObject();
|
||||
return transactNative(code, data, reply, replyOwnsNative, flags);
|
||||
} finally {
|
||||
AppOpsManager.resumeNotedAppOpsCollection(prevCollection);
|
||||
|
||||
@@ -572,7 +573,7 @@ public final class BinderProxy implements IBinder {
|
||||
* Native implementation of transact() for proxies
|
||||
*/
|
||||
public native boolean transactNative(int code, Parcel data, Parcel reply,
|
||||
int flags) throws RemoteException;
|
||||
boolean replyOwnsNativeParcelObject, int flags) throws RemoteException;
|
||||
/**
|
||||
* See {@link IBinder#linkToDeath(DeathRecipient, int)}
|
||||
*/
|
||||
|
||||
@@ -3691,4 +3691,9 @@ public final class Parcel {
|
||||
public long getBlobAshmemSize() {
|
||||
return nativeGetBlobAshmemSize(mNativePtr);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
/*package*/ boolean ownsNativeParcelObject() {
|
||||
return mOwnsNativeParcelObject;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user