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

Commit 6e53d7ef authored by Dan Sandler's avatar Dan Sandler Committed by Android Git Automerger
Browse files

am 2f99ca32: am 90ac386b: Merge "Deal more gracefully with null smallIcons." into mnc-dev

* commit '2f99ca32':
  Deal more gracefully with null smallIcons.
parents 255c90b4 2f99ca32
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1366,7 +1366,9 @@ public class Notification implements Parcelable
        int version = parcel.readInt();

        when = parcel.readLong();
        if (parcel.readInt() != 0) {
            mSmallIcon = Icon.CREATOR.createFromParcel(parcel);
        }
        number = parcel.readInt();
        if (parcel.readInt() != 0) {
            contentIntent = PendingIntent.CREATOR.createFromParcel(parcel);
@@ -1590,7 +1592,12 @@ public class Notification implements Parcelable
        parcel.writeInt(1);

        parcel.writeLong(when);
        if (mSmallIcon != null) {
            parcel.writeInt(1);
            mSmallIcon.writeToParcel(parcel, 0);
        } else {
            parcel.writeInt(0);
        }
        parcel.writeInt(number);
        if (contentIntent != null) {
            parcel.writeInt(1);
@@ -3241,7 +3248,7 @@ public class Notification implements Parcelable
            Notification n = new Notification();
            n.when = mWhen;
            n.mSmallIcon = mSmallIcon;
            if (mSmallIcon.getType() == Icon.TYPE_RESOURCE) {
            if (mSmallIcon != null && mSmallIcon.getType() == Icon.TYPE_RESOURCE) {
                n.icon = mSmallIcon.getResId();
            }
            n.iconLevel = mSmallIconLevel;