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

Commit 8257bff5 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Fixes a bug where setting a null bigLargeIcon would not clear it am: e99acb29 am: c39f8c44

am: 90307e08

Change-Id: I309bb41f8cb6201d1016f488c3478dc772ba4f12
parents 5d7731bb 90307e08
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4428,9 +4428,15 @@ public class Notification implements Parcelable
            //          mN.mLargeIcon
            //   2. !mBigLargeIconSet -> mN.mLargeIcon applies
            Icon oldLargeIcon = null;
            Bitmap largeIconLegacy = null;
            if (mBigLargeIconSet) {
                oldLargeIcon = mBuilder.mN.mLargeIcon;
                mBuilder.mN.mLargeIcon = mBigLargeIcon;
                // The legacy largeIcon might not allow us to clear the image, as it's taken in
                // replacement if the other one is null. Because we're restoring these legacy icons
                // for old listeners, this is in general non-null.
                largeIconLegacy = mBuilder.mN.largeIcon;
                mBuilder.mN.largeIcon = null;
            }

            RemoteViews contentView = getStandardView(mBuilder.getBigPictureLayoutResource());
@@ -4442,6 +4448,7 @@ public class Notification implements Parcelable

            if (mBigLargeIconSet) {
                mBuilder.mN.mLargeIcon = oldLargeIcon;
                mBuilder.mN.largeIcon = largeIconLegacy;
            }

            contentView.setImageViewBitmap(R.id.big_picture, mPicture);