Fix formatting of ANRs.
Fix for cases where an extra newline would be added and/or a newline at the end of a line would be ommited.
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 3ecfd8a..47a58cf 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4638,11 +4638,12 @@
if (activity != null && activity.shortComponentName != null) {
info.append(" (").append(activity.shortComponentName).append(")");
}
+ info.append("\n");
if (annotation != null) {
- info.append("\nReason: ").append(annotation).append("\n");
+ info.append("Reason: ").append(annotation).append("\n");
}
if (parent != null && parent != activity) {
- info.append("\nParent: ").append(parent.shortComponentName);
+ info.append("Parent: ").append(parent.shortComponentName).append("\n");
}
String cpuInfo = null;