Loading core/java/android/app/ActivityThread.java +2 −0 Original line number Diff line number Diff line Loading @@ -3107,6 +3107,8 @@ public final class ActivityThread { /** * For system applications on userdebug/eng builds, log stack * traces of disk and network access to dropbox for analysis. * * Similar logic exists in SystemServer.java. */ if ((data.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | Loading services/java/com/android/server/SystemServer.java +11 −0 Original line number Diff line number Diff line Loading @@ -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!"); } Loading services/java/com/android/server/am/ActivityManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -6535,13 +6535,19 @@ public final class ActivityManagerService extends ActivityManagerNative * Utility function for addErrorToDropBox and handleStrictModeViolation's logging * to append various headers to the dropbox log text. */ private static void appendDropBoxProcessHeaders(ProcessRecord process, StringBuilder sb) { private void appendDropBoxProcessHeaders(ProcessRecord process, StringBuilder sb) { // Note: ProcessRecord 'process' is guarded by the service // instance. (notably process.pkgList, which could otherwise change // concurrently during execution of this method) synchronized (this) { if (process == null || process.pid == MY_PID) { sb.append("Process: system_server\n"); } else { sb.append("Process: ").append(process.processName).append("\n"); } if (process != null) { if (process == null) { return; } int flags = process.info.flags; IPackageManager pm = AppGlobals.getPackageManager(); sb.append("Flags: 0x").append(Integer.toString(flags, 16)).append("\n"); Loading Loading
core/java/android/app/ActivityThread.java +2 −0 Original line number Diff line number Diff line Loading @@ -3107,6 +3107,8 @@ public final class ActivityThread { /** * For system applications on userdebug/eng builds, log stack * traces of disk and network access to dropbox for analysis. * * Similar logic exists in SystemServer.java. */ if ((data.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | Loading
services/java/com/android/server/SystemServer.java +11 −0 Original line number Diff line number Diff line Loading @@ -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!"); } Loading
services/java/com/android/server/am/ActivityManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -6535,13 +6535,19 @@ public final class ActivityManagerService extends ActivityManagerNative * Utility function for addErrorToDropBox and handleStrictModeViolation's logging * to append various headers to the dropbox log text. */ private static void appendDropBoxProcessHeaders(ProcessRecord process, StringBuilder sb) { private void appendDropBoxProcessHeaders(ProcessRecord process, StringBuilder sb) { // Note: ProcessRecord 'process' is guarded by the service // instance. (notably process.pkgList, which could otherwise change // concurrently during execution of this method) synchronized (this) { if (process == null || process.pid == MY_PID) { sb.append("Process: system_server\n"); } else { sb.append("Process: ").append(process.processName).append("\n"); } if (process != null) { if (process == null) { return; } int flags = process.info.flags; IPackageManager pm = AppGlobals.getPackageManager(); sb.append("Flags: 0x").append(Integer.toString(flags, 16)).append("\n"); Loading