Loading core/java/android/os/BinderProxy.java +30 −29 Original line number Diff line number Diff line Loading @@ -241,9 +241,16 @@ public final class BinderProxy implements IBinder { } Map<String, Integer> counts = new HashMap<>(); final ArrayList<WeakReference<BinderProxy>> proxiesToQuery = new ArrayList<WeakReference<BinderProxy>>(); synchronized (sProxyMap) { for (ArrayList<WeakReference<BinderProxy>> a : mMainIndexValues) { if (a != null) { for (WeakReference<BinderProxy> weakRef : a) { proxiesToQuery.addAll(a); } } } for (WeakReference<BinderProxy> weakRef : proxiesToQuery) { BinderProxy bp = weakRef.get(); String key; if (bp == null) { Loading @@ -265,8 +272,6 @@ public final class BinderProxy implements IBinder { counts.put(key, i + 1); } } } } Map.Entry<String, Integer>[] sorted = counts.entrySet().toArray( new Map.Entry[counts.size()]); Loading Loading @@ -354,10 +359,8 @@ public final class BinderProxy implements IBinder { * @hide */ public static InterfaceCount[] getSortedInterfaceCounts(int num) { synchronized (sProxyMap) { return sProxyMap.getSortedInterfaceCounts(num); } } /** * Returns the number of binder proxies held in this process. Loading @@ -376,12 +379,10 @@ public final class BinderProxy implements IBinder { */ public static void dumpProxyDebugInfo() { if (Build.IS_DEBUGGABLE) { synchronized (sProxyMap) { sProxyMap.dumpProxyInterfaceCounts(); sProxyMap.dumpPerUidProxyCounts(); } } } /** * Return a BinderProxy for IBinder. Loading Loading
core/java/android/os/BinderProxy.java +30 −29 Original line number Diff line number Diff line Loading @@ -241,9 +241,16 @@ public final class BinderProxy implements IBinder { } Map<String, Integer> counts = new HashMap<>(); final ArrayList<WeakReference<BinderProxy>> proxiesToQuery = new ArrayList<WeakReference<BinderProxy>>(); synchronized (sProxyMap) { for (ArrayList<WeakReference<BinderProxy>> a : mMainIndexValues) { if (a != null) { for (WeakReference<BinderProxy> weakRef : a) { proxiesToQuery.addAll(a); } } } for (WeakReference<BinderProxy> weakRef : proxiesToQuery) { BinderProxy bp = weakRef.get(); String key; if (bp == null) { Loading @@ -265,8 +272,6 @@ public final class BinderProxy implements IBinder { counts.put(key, i + 1); } } } } Map.Entry<String, Integer>[] sorted = counts.entrySet().toArray( new Map.Entry[counts.size()]); Loading Loading @@ -354,10 +359,8 @@ public final class BinderProxy implements IBinder { * @hide */ public static InterfaceCount[] getSortedInterfaceCounts(int num) { synchronized (sProxyMap) { return sProxyMap.getSortedInterfaceCounts(num); } } /** * Returns the number of binder proxies held in this process. Loading @@ -376,12 +379,10 @@ public final class BinderProxy implements IBinder { */ public static void dumpProxyDebugInfo() { if (Build.IS_DEBUGGABLE) { synchronized (sProxyMap) { sProxyMap.dumpProxyInterfaceCounts(); sProxyMap.dumpPerUidProxyCounts(); } } } /** * Return a BinderProxy for IBinder. Loading