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

Commit f3528480 authored by Christoph Studer's avatar Christoph Studer Committed by Android Git Automerger
Browse files

am 1464dd2f: am 0b22e395: Merge "Notification: Fix bigLargeIcon" into lmp-mr1-dev

* commit '1464dd2f':
  Notification: Fix bigLargeIcon
parents 00e2afb7 1464dd2f
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -3772,8 +3772,24 @@ public class Notification implements Parcelable
        }

        private RemoteViews makeBigContentView() {

            // Replace mLargeIcon with mBigLargeIcon if mBigLargeIconSet
            // This covers the following cases:
            //   1. mBigLargeIconSet -> mBigLargeIcon (null or non-null) applies, overrides
            //          mLargeIcon
            //   2. !mBigLargeIconSet -> mLargeIcon applies
            Bitmap oldLargeIcon = null;
            if (mBigLargeIconSet) {
                oldLargeIcon = mBuilder.mLargeIcon;
                mBuilder.mLargeIcon = mBigLargeIcon;
            }

            RemoteViews contentView = getStandardView(mBuilder.getBigPictureLayoutResource());

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

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

            applyTopPadding(contentView);
@@ -3804,6 +3820,7 @@ public class Notification implements Parcelable
            super.restoreFromExtras(extras);

            if (extras.containsKey(EXTRA_LARGE_ICON_BIG)) {
                mBigLargeIconSet = true;
                mBigLargeIcon = extras.getParcelable(EXTRA_LARGE_ICON_BIG);
            }
            mPicture = extras.getParcelable(EXTRA_PICTURE);