Fix gNumProxies double increment.

Bug: 70217678
Test: proxy counts look reasonable
Change-Id: I6147d6038794eabd6b3446d78cd29af9d40ef7cc
This commit is contained in:
Martijn Coenen
2018-02-07 10:25:39 +01:00
parent 1f14eab551
commit 5183c0eeff

View File

@@ -664,7 +664,7 @@ jobject javaObjectForIBinder(JNIEnv* env, const sp<IBinder>& val)
nativeData->mObject = val;
gNativeDataCache = nullptr;
++gNumProxies;
if (++gNumProxies >= gProxiesWarned + PROXY_WARN_INTERVAL) {
if (gNumProxies >= gProxiesWarned + PROXY_WARN_INTERVAL) {
ALOGW("Unexpectedly many live BinderProxies: %d\n", gNumProxies);
gProxiesWarned = gNumProxies;
}