Fix parcel recycling when no response from bridge
In case that there is no response from bridge, a second try of sending binder will cause the (unowned) parcels to be recycled twice.
This commit is contained in:
parent
1b98e55cfc
commit
0a2f26fef9
|
|
@ -126,11 +126,11 @@ public class BridgeService {
|
|||
return;
|
||||
}
|
||||
|
||||
Parcel data = Parcel.obtain();
|
||||
Parcel reply = Parcel.obtain();
|
||||
boolean res = false;
|
||||
// try at most three times
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Parcel data = Parcel.obtain();
|
||||
Parcel reply = Parcel.obtain();
|
||||
try {
|
||||
data.writeInterfaceToken(DESCRIPTOR);
|
||||
data.writeInt(ACTION.ACTION_SEND_BINDER.ordinal());
|
||||
|
|
|
|||
Loading…
Reference in New Issue