From e0ee6efb1e5bc6cf219555e333635ce98531bc85 Mon Sep 17 00:00:00 2001 From: Jacek Surazski Date: Thu, 7 Jan 2010 16:23:03 +0100 Subject: [PATCH] Add systemApp field to ApplicationErrorReport --- core/java/android/app/ApplicationErrorReport.java | 8 ++++++++ .../com/android/server/am/ActivityManagerService.java | 1 + 2 files changed, 9 insertions(+) diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java index a4b692f1f1411..832f5992401c3 100644 --- a/core/java/android/app/ApplicationErrorReport.java +++ b/core/java/android/app/ApplicationErrorReport.java @@ -81,6 +81,11 @@ public class ApplicationErrorReport implements Parcelable { */ public long time; + /** + * Set if the app is on the system image. + */ + public boolean systemApp; + /** * If this report is of type {@link #TYPE_CRASH}, contains an instance * of CrashInfo describing the crash; otherwise null. @@ -113,6 +118,7 @@ public class ApplicationErrorReport implements Parcelable { dest.writeString(installerPackageName); dest.writeString(processName); dest.writeLong(time); + dest.writeInt(systemApp ? 1 : 0); switch (type) { case TYPE_CRASH: @@ -130,6 +136,7 @@ public class ApplicationErrorReport implements Parcelable { installerPackageName = in.readString(); processName = in.readString(); time = in.readLong(); + systemApp = in.readInt() == 1; switch (type) { case TYPE_CRASH: @@ -331,6 +338,7 @@ public class ApplicationErrorReport implements Parcelable { pw.println(prefix + "installerPackageName: " + installerPackageName); pw.println(prefix + "processName: " + processName); pw.println(prefix + "time: " + time); + pw.println(prefix + "systemApp: " + systemApp); switch (type) { case TYPE_CRASH: diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 843058c76aed5..5b50a3ac7390a 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -8994,6 +8994,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen report.installerPackageName = r.errorReportReceiver.getPackageName(); report.processName = r.processName; report.time = timeMillis; + report.systemApp = (r.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0; if (r.crashing) { report.type = ApplicationErrorReport.TYPE_CRASH;