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

Commit f94d0057 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Set inflater factory for group summary header

This enables the app icon changes there too.

Bug: 371174789
Test: manually post group notifications and see that they have the right icon
Flag: android.app.notifications_redesign_app_icons
Change-Id: I093701466fecd66435b140eee415733ffa256e5e
parent aa6cf998
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -478,6 +478,13 @@ public class NotificationContentInflater implements NotificationRowContentBinder
                notifLayoutInflaterFactoryProvider.provide(row, FLAG_CONTENT_VIEW_HEADS_UP));
        setRemoteViewsInflaterFactory(result.newPublicView,
                notifLayoutInflaterFactoryProvider.provide(row, FLAG_CONTENT_VIEW_PUBLIC));
        if (android.app.Flags.notificationsRedesignAppIcons()) {
            setRemoteViewsInflaterFactory(result.mNewGroupHeaderView,
                    notifLayoutInflaterFactoryProvider.provide(row, FLAG_GROUP_SUMMARY_HEADER));
            setRemoteViewsInflaterFactory(result.mNewMinimizedGroupHeaderView,
                    notifLayoutInflaterFactoryProvider.provide(row,
                            FLAG_LOW_PRIORITY_GROUP_SUMMARY_HEADER));
        }
    }

    private static void setRemoteViewsInflaterFactory(RemoteViews remoteViews,
@@ -516,6 +523,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
                    logger.logAsyncTaskProgress(entry, "contracted view applied");
                    result.inflatedContentView = v;
                }

                @Override
                public RemoteViews getRemoteView() {
                    return result.newContentView;
@@ -1406,6 +1414,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
    @VisibleForTesting
    abstract static class ApplyCallback {
        public abstract void setResultView(View v);

        public abstract RemoteViews getRemoteView();
    }