Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 393f89f2 authored by Olawale Ogunwale's avatar Olawale Ogunwale Committed by Gerrit Code Review
Browse files

Merge "[ActivityManager] Avoid NullPointerException if no crash info"

parents 1bdbce29 3d86b88f
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -235,10 +235,13 @@ public class ApplicationErrorReport implements Parcelable {
        dest.writeString(processName);
        dest.writeString(processName);
        dest.writeLong(time);
        dest.writeLong(time);
        dest.writeInt(systemApp ? 1 : 0);
        dest.writeInt(systemApp ? 1 : 0);
        dest.writeInt(crashInfo != null ? 1 : 0);


        switch (type) {
        switch (type) {
            case TYPE_CRASH:
            case TYPE_CRASH:
                if (crashInfo != null) {
                    crashInfo.writeToParcel(dest, flags);
                    crashInfo.writeToParcel(dest, flags);
                }
                break;
                break;
            case TYPE_ANR:
            case TYPE_ANR:
                anrInfo.writeToParcel(dest, flags);
                anrInfo.writeToParcel(dest, flags);
@@ -259,10 +262,11 @@ public class ApplicationErrorReport implements Parcelable {
        processName = in.readString();
        processName = in.readString();
        time = in.readLong();
        time = in.readLong();
        systemApp = in.readInt() == 1;
        systemApp = in.readInt() == 1;
        boolean hasCrashInfo = in.readInt() == 1;


        switch (type) {
        switch (type) {
            case TYPE_CRASH:
            case TYPE_CRASH:
                crashInfo = new CrashInfo(in);
                crashInfo = hasCrashInfo ? new CrashInfo(in) : null;
                anrInfo = null;
                anrInfo = null;
                batteryInfo = null;
                batteryInfo = null;
                runningServiceInfo = null;
                runningServiceInfo = null;