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

Commit 78cb6c72 authored by Richard MacGregor's avatar Richard MacGregor
Browse files

Inflate public notification view

In preparation for screenshare protection, always inflate public
notification views

Test: atest SystemUITests
Bug: 312784780
Flag: ACONFIG com.android.systemui.screenshare_notification_hiding DISABLED
Change-Id: Ic0606f846fb01cb720f934af52e46e10600f5c1c
parent 02ecb0b4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.statusbar.notification.collection.inflation;

import static com.android.systemui.Flags.screenshareNotificationHiding;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_EXPANDED;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC;
@@ -243,7 +244,11 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {
        params.setUseIncreasedCollapsedHeight(useIncreasedCollapsedHeight);
        params.setUseLowPriority(isLowPriority);

        if (mNotificationLockscreenUserManager.needsRedaction(entry)) {
        // If screenshareNotificationHiding is enabled, both public and private views should be
        // inflated to avoid any latency associated with reinflating all notification views when
        // screen share starts and stops
        if (screenshareNotificationHiding()
                || mNotificationLockscreenUserManager.needsRedaction(entry)) {
            params.requireContentViews(FLAG_CONTENT_VIEW_PUBLIC);
        } else {
            params.markContentViewsFreeable(FLAG_CONTENT_VIEW_PUBLIC);