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

Commit 90ac386b authored by Dan Sandler's avatar Dan Sandler Committed by Android (Google) Code Review
Browse files

Merge "Deal more gracefully with null smallIcons." into mnc-dev

parents e15cecc9 3936e7a6
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;