Fix NetworkOffer Death link does not exist am: 3ec7e6d9fb am: f405adead7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1799528 Change-Id: I8188f0bc257910e1ebb6353f60db078a3cf6a8e4
This commit is contained in:
@@ -6908,7 +6908,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
if (DBG) {
|
||||
log("unregister offer from providerId " + noi.offer.providerId + " : " + noi.offer);
|
||||
}
|
||||
mNetworkOffers.remove(noi);
|
||||
|
||||
// If the provider removes the offer and dies immediately afterwards this
|
||||
// function may be called twice in a row, but the array will no longer contain
|
||||
// the offer.
|
||||
if (!mNetworkOffers.remove(noi)) return;
|
||||
noi.offer.callback.asBinder().unlinkToDeath(noi, 0 /* flags */);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user