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

Commit 39c69db1 authored by Dan Sandler's avatar Dan Sandler Committed by Android Git Automerger
Browse files

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

* commit '90ac386b':
  Deal more gracefully with null smallIcons.
parents f41fb2e1 90ac386b
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;