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

Commit 0721861d authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

StrictMode: now in more system server threads.

Who knew there were so many Loopers in the system server?

This adds dropbox logging for the activity manager thread, policy
thread, and window manager thread.

The goal's to catch more stuttering.

Change-Id: I3ce8518ce183b3c90426750a2992e67200fee5d5
parent c563859b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.TokenWatcher;
@@ -920,6 +921,11 @@ public class WindowManagerService extends IWindowManager.Stub
                notifyAll();
            }

            // For debug builds, log event loop stalls to dropbox for analysis.
            if (StrictMode.conditionallyEnableDebugLogging()) {
                Slog.i(TAG, "Enabled StrictMode logging for WMThread's Looper");
            }

            Looper.loop();
        }
    }
@@ -957,6 +963,11 @@ public class WindowManagerService extends IWindowManager.Stub
                notifyAll();
            }

            // For debug builds, log event loop stalls to dropbox for analysis.
            if (StrictMode.conditionallyEnableDebugLogging()) {
                Slog.i(TAG, "Enabled StrictMode for PolicyThread's Looper");
            }

            Looper.loop();
        }
    }
+5 −0
Original line number Diff line number Diff line
@@ -1334,6 +1334,11 @@ public final class ActivityManagerService extends ActivityManagerNative
                }
            }
            // For debug builds, log event loop stalls to dropbox for analysis.
            if (StrictMode.conditionallyEnableDebugLogging()) {
                Slog.i(TAG, "Enabled StrictMode logging for AThread's Looper");
            }
            Looper.loop();
        }
    }