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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Parcel data = Parcel.obtain();
|
|
||||||
Parcel reply = Parcel.obtain();
|
|
||||||
boolean res = false;
|
boolean res = false;
|
||||||
// try at most three times
|
// try at most three times
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
try {
|
try {
|
||||||
data.writeInterfaceToken(DESCRIPTOR);
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
data.writeInt(ACTION.ACTION_SEND_BINDER.ordinal());
|
data.writeInt(ACTION.ACTION_SEND_BINDER.ordinal());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue