Merge "Decrement networkRequestPerUid when callbacks are unregistered."

This commit is contained in:
Cody Kesting
2020-03-31 00:07:01 +00:00
committed by Gerrit Code Review

View File

@@ -7893,6 +7893,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
return;
}
// Decrement the reference count for this NetworkRequestInfo. The reference count is
// incremented when the NetworkRequestInfo is created as part of
// enforceRequestCountLimit().
decrementNetworkRequestPerUidCount(nri);
cb.asBinder().unlinkToDeath(mConnectivityDiagnosticsCallbacks.remove(cb), 0);
}