diff options
author | Jacek Surazski <jaceks@google.com> | 2009-05-25 17:56:41 +0200 |
---|---|---|
committer | Jacek Surazski <jaceks@google.com> | 2009-05-25 18:04:24 +0200 |
commit | 28b0e5d06a04f6fa13edbb28de1dd226a158f724 (patch) | |
tree | 0b1fd41aa307b2cedc65bee744231bee431c9315 /core | |
parent | 04561a55df693e7bd8d3047ccc4fbef504ac07cf (diff) | |
download | frameworks_base-28b0e5d06a04f6fa13edbb28de1dd226a158f724.zip frameworks_base-28b0e5d06a04f6fa13edbb28de1dd226a158f724.tar.gz frameworks_base-28b0e5d06a04f6fa13edbb28de1dd226a158f724.tar.bz2 |
This just makes it easier to derive from ApplicationErrorReport.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/ApplicationErrorReport.java | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java index 72cbff4..74ed1e2 100644 --- a/core/java/android/app/ApplicationErrorReport.java +++ b/core/java/android/app/ApplicationErrorReport.java @@ -18,7 +18,6 @@ package android.app; import android.os.Parcel; import android.os.Parcelable; -import android.util.Log; import android.util.Printer; /** @@ -103,20 +102,7 @@ public class ApplicationErrorReport implements Parcelable { * a parcel. */ ApplicationErrorReport(Parcel in) { - type = in.readInt(); - packageName = in.readString(); - installerPackageName = in.readString(); - processName = in.readString(); - time = in.readLong(); - - switch (type) { - case TYPE_CRASH: - crashInfo = new CrashInfo(in); - break; - case TYPE_ANR: - anrInfo = new AnrInfo(in); - break; - } + readFromParcel(in); } public void writeToParcel(Parcel dest, int flags) { @@ -136,6 +122,25 @@ public class ApplicationErrorReport implements Parcelable { } } + protected void readFromParcel(Parcel in) { + type = in.readInt(); + packageName = in.readString(); + installerPackageName = in.readString(); + processName = in.readString(); + time = in.readLong(); + + switch (type) { + case TYPE_CRASH: + crashInfo = new CrashInfo(in); + anrInfo = null; + break; + case TYPE_ANR: + anrInfo = new AnrInfo(in); + crashInfo = null; + break; + } + } + /** * Describes an application crash. */ |