am f26ac1f8: am 96d6c345: Merge "Unify some duplicate StrictMode-enabling code." into gingerbread

Merge commit 'f26ac1f8ed27d9e88bbde8978557c34788c7509c'

* commit 'f26ac1f8ed27d9e88bbde8978557c34788c7509c':
  Unify some duplicate StrictMode-enabling code.
This commit is contained in:
Brad Fitzpatrick
2010-09-15 11:37:54 -07:00
committed by Android Git Automerger
3 changed files with 23 additions and 17 deletions

View File

@@ -535,14 +535,8 @@ 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);
if (StrictMode.conditionallyEnableDebugLogging()) {
Slog.i(TAG, "Enabled StrictMode for system server main thread.");
}
Looper.loop();