Loading services/core/java/com/android/server/am/ActivityManagerService.java +22 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.Date; import java.text.SimpleDateFormat; public final class ActivityManagerService extends ActivityManagerNative implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback { Loading Loading @@ -481,6 +483,8 @@ public final class ActivityManagerService extends ActivityManagerNative */ String mDeviceOwnerName; SimpleDateFormat mTraceDateFormat = new SimpleDateFormat("dd_MMM_HH_mm_ss.SSS"); public class PendingAssistExtras extends Binder implements Runnable { public final ActivityRecord activity; public final Bundle extras; Loading Loading @@ -5071,6 +5075,24 @@ public final class ActivityManagerService extends ActivityManagerNative annotation != null ? "ANR " + annotation : "ANR", info.toString()); //Set the trace file name to app name + current date format to avoid overrinding trace file String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null); if (tracesPath != null && tracesPath.length() != 0) { File traceRenameFile = new File(tracesPath); String newTracesPath; int lpos = tracesPath.lastIndexOf ("."); if (-1 != lpos) newTracesPath = tracesPath.substring (0, lpos) + "_" + app.processName + "_" + mTraceDateFormat.format(new Date()) + tracesPath.substring (lpos); else newTracesPath = tracesPath + "_" + app.processName; traceRenameFile.renameTo(new File(newTracesPath)); Process.sendSignal(app.pid, 6); SystemClock.sleep(1000); Process.sendSignal(app.pid, 6); SystemClock.sleep(1000); } // Bring up the infamous App Not Responding dialog Message msg = Message.obtain(); HashMap<String, Object> map = new HashMap<String, Object>(); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +22 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.Date; import java.text.SimpleDateFormat; public final class ActivityManagerService extends ActivityManagerNative implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback { Loading Loading @@ -481,6 +483,8 @@ public final class ActivityManagerService extends ActivityManagerNative */ String mDeviceOwnerName; SimpleDateFormat mTraceDateFormat = new SimpleDateFormat("dd_MMM_HH_mm_ss.SSS"); public class PendingAssistExtras extends Binder implements Runnable { public final ActivityRecord activity; public final Bundle extras; Loading Loading @@ -5071,6 +5075,24 @@ public final class ActivityManagerService extends ActivityManagerNative annotation != null ? "ANR " + annotation : "ANR", info.toString()); //Set the trace file name to app name + current date format to avoid overrinding trace file String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null); if (tracesPath != null && tracesPath.length() != 0) { File traceRenameFile = new File(tracesPath); String newTracesPath; int lpos = tracesPath.lastIndexOf ("."); if (-1 != lpos) newTracesPath = tracesPath.substring (0, lpos) + "_" + app.processName + "_" + mTraceDateFormat.format(new Date()) + tracesPath.substring (lpos); else newTracesPath = tracesPath + "_" + app.processName; traceRenameFile.renameTo(new File(newTracesPath)); Process.sendSignal(app.pid, 6); SystemClock.sleep(1000); Process.sendSignal(app.pid, 6); SystemClock.sleep(1000); } // Bring up the infamous App Not Responding dialog Message msg = Message.obtain(); HashMap<String, Object> map = new HashMap<String, Object>(); Loading