Loading services/java/com/android/server/am/ActivityManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -3004,7 +3004,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } final void logAppTooSlow(ProcessRecord app, long startTime, String msg) { final void logAppTooSlow(int pid, long startTime, String msg) { if (IS_USER_BUILD) { return; } Loading Loading @@ -3037,7 +3037,7 @@ public final class ActivityManagerService extends ActivityManagerNative sb.append(msg); FileOutputStream fos = new FileOutputStream(tracesFile); fos.write(sb.toString().getBytes()); if (app == null) { if (pid <= 0) { fos.write("\n*** No application process!".getBytes()); } fos.close(); Loading @@ -3047,9 +3047,9 @@ public final class ActivityManagerService extends ActivityManagerNative return; } if (app != null) { if (pid > 0) { ArrayList<Integer> firstPids = new ArrayList<Integer>(); firstPids.add(app.pid); firstPids.add(pid); dumpStackTraces(tracesPath, firstPids, null, null); } Loading services/java/com/android/server/am/ActivityStack.java +20 −4 Original line number Diff line number Diff line Loading @@ -307,11 +307,18 @@ final class ActivityStack { // We don't at this point know if the activity is fullscreen, // so we need to be conservative and assume it isn't. Slog.w(TAG, "Activity pause timeout for " + r); int pid = -1; long pauseTime = 0; String m = null; synchronized (mService) { if (r.app != null) { mService.logAppTooSlow(r.app, r.pauseTime, "pausing " + r); pid = r.app.pid; } pauseTime = r.pauseTime; m = "pausing " + r; } if (pid > 0) { mService.logAppTooSlow(pid, pauseTime, m); } activityPaused(r != null ? r.appToken : null, true); Loading @@ -332,11 +339,20 @@ final class ActivityStack { } break; case LAUNCH_TICK_MSG: { ActivityRecord r = (ActivityRecord)msg.obj; int pid = -1; long launchTickTime = 0; String m = null; synchronized (mService) { if (r.continueLaunchTickingLocked()) { mService.logAppTooSlow(r.app, r.launchTickTime, "launching " + r); if (r.app != null) { pid = r.app.pid; } launchTickTime = r.launchTickTime; m = "launching " + r; } } if (pid > 0) { mService.logAppTooSlow(pid, launchTickTime, m); } } break; case DESTROY_TIMEOUT_MSG: { Loading Loading
services/java/com/android/server/am/ActivityManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -3004,7 +3004,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } final void logAppTooSlow(ProcessRecord app, long startTime, String msg) { final void logAppTooSlow(int pid, long startTime, String msg) { if (IS_USER_BUILD) { return; } Loading Loading @@ -3037,7 +3037,7 @@ public final class ActivityManagerService extends ActivityManagerNative sb.append(msg); FileOutputStream fos = new FileOutputStream(tracesFile); fos.write(sb.toString().getBytes()); if (app == null) { if (pid <= 0) { fos.write("\n*** No application process!".getBytes()); } fos.close(); Loading @@ -3047,9 +3047,9 @@ public final class ActivityManagerService extends ActivityManagerNative return; } if (app != null) { if (pid > 0) { ArrayList<Integer> firstPids = new ArrayList<Integer>(); firstPids.add(app.pid); firstPids.add(pid); dumpStackTraces(tracesPath, firstPids, null, null); } Loading
services/java/com/android/server/am/ActivityStack.java +20 −4 Original line number Diff line number Diff line Loading @@ -307,11 +307,18 @@ final class ActivityStack { // We don't at this point know if the activity is fullscreen, // so we need to be conservative and assume it isn't. Slog.w(TAG, "Activity pause timeout for " + r); int pid = -1; long pauseTime = 0; String m = null; synchronized (mService) { if (r.app != null) { mService.logAppTooSlow(r.app, r.pauseTime, "pausing " + r); pid = r.app.pid; } pauseTime = r.pauseTime; m = "pausing " + r; } if (pid > 0) { mService.logAppTooSlow(pid, pauseTime, m); } activityPaused(r != null ? r.appToken : null, true); Loading @@ -332,11 +339,20 @@ final class ActivityStack { } break; case LAUNCH_TICK_MSG: { ActivityRecord r = (ActivityRecord)msg.obj; int pid = -1; long launchTickTime = 0; String m = null; synchronized (mService) { if (r.continueLaunchTickingLocked()) { mService.logAppTooSlow(r.app, r.launchTickTime, "launching " + r); if (r.app != null) { pid = r.app.pid; } launchTickTime = r.launchTickTime; m = "launching " + r; } } if (pid > 0) { mService.logAppTooSlow(pid, launchTickTime, m); } } break; case DESTROY_TIMEOUT_MSG: { Loading