Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef914b16 authored by Jing Ji's avatar Jing Ji
Browse files

Spawn new thread on dumping BinderProxy leaks

Because the dumping will take a long time.

Bug: 333957365
Test: Manual
Change-Id: Ic221a36efa31aeb422dd1cca2e8a92903d5b4156
parent de541612
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9189,6 +9189,11 @@ public class ActivityManagerService extends IActivityManager.Stub
    private class MyBinderProxyCountEventListener implements BinderProxyCountEventListener {
        @Override
        public void onLimitReached(int uid) {
            // Spawn a new thread for the dump as it'll take long time.
            new Thread(() -> handleLimitReached(uid), "BinderProxy Dump: " + uid).start();
        }
        private void handleLimitReached(int uid) {
            Slog.wtf(TAG, "Uid " + uid + " sent too many Binders to uid "
                    + Process.myUid());
            BinderProxy.dumpProxyDebugInfo();