am 37fc8cc7: am b724d251: Merge "Enable strictmode logging in system_server & add a lock." into gingerbread

Merge commit '37fc8cc7b87133eddacaeab60cabefaf4a7b9bdd'

* commit '37fc8cc7b87133eddacaeab60cabefaf4a7b9bdd':
  Enable strictmode logging in system_server & add a lock.
This commit is contained in:
Brad Fitzpatrick
2010-09-10 15:07:20 -07:00
committed by Android Git Automerger
3 changed files with 26 additions and 7 deletions

View File

@@ -532,6 +532,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!");
}