Enable strictmode logging in system_server & add a lock.
We weren't logging strictmode violation in the system_server process in non-user builds (only system apps), even though the rest of the strictmode logging supports it. Also add a missing lock in ActivityManagerService. Change-Id: If2af96a7e4fdde604a647b836097f0029ef1334b
This commit is contained in:
@@ -517,6 +517,17 @@ class ServerThread extends Thread {
|
||||
}
|
||||
});
|
||||
|
||||
// For debug builds, log event loop stalls to dropbox for analysis.
|
||||
// Similar logic also appears in ActivityThread.java for system apps.
|
||||
if (!"user".equals(Build.TYPE)) {
|
||||
Slog.i(TAG, "Enabling StrictMode for system server.");
|
||||
StrictMode.setThreadPolicy(
|
||||
StrictMode.DISALLOW_DISK_WRITE |
|
||||
StrictMode.DISALLOW_DISK_READ |
|
||||
StrictMode.DISALLOW_NETWORK |
|
||||
StrictMode.PENALTY_DROPBOX);
|
||||
}
|
||||
|
||||
Looper.loop();
|
||||
Slog.d(TAG, "System ServerThread is exiting!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user