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

Commit 089e3e45 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Don't recreate remote views that already exist.

Bug: 25582071
Change-Id: Ie56225ec57ab43b2cab5ffb0198f283592e7bcd9
parent 85d9fed1
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
@@ -3271,12 +3271,16 @@ public class Notification implements Parcelable
         * Construct a RemoteViews for the final big notification layout.
         */
        public RemoteViews makeBigContentView() {
            if (mStyle != null) {
            if (mN.bigContentView != null) {
                return mN.bigContentView;
            } else if (mStyle != null) {
                final RemoteViews styleView = mStyle.makeBigContentView();
                if (styleView != null) {
                    return styleView;
                }
            } else if (mActions.size() == 0) return null;
            } else if (mActions.size() == 0) {
                return null;
            }

            return applyStandardTemplateWithActions(getBigBaseLayoutResource());
        }
@@ -3285,12 +3289,17 @@ public class Notification implements Parcelable
         * Construct a RemoteViews for the final heads-up notification layout.
         */
        public RemoteViews makeHeadsUpContentView() {
            if (mStyle != null) {
            if (mN.headsUpContentView != null) {
                return mN.headsUpContentView;
            } else if (mStyle != null) {
                    final RemoteViews styleView = mStyle.makeHeadsUpContentView();
                    if (styleView != null) {
                        return styleView;
                    }
            } else if (mActions.size() == 0) return null;
            } else if (mActions.size() == 0) {
                return null;
            }


            return applyStandardTemplateWithActions(getBigBaseLayoutResource());
        }