From ccb85723ac1931d5dc0789409cdfa95d26af45e8 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Fri, 30 Oct 2020 14:20:37 -0500 Subject: [PATCH] Clear notification undershelf background Bug: 171817112 Test: manual, for minimized, expanded, heads up notifs adb shell settings put global show_new_notif_dismiss [0|1] 1) disable flag - undershelf unchanged 2) enable flag - undershelf background is transparent Change-Id: Icf2a0d0116e8a2c7263b370060676135f8830587 --- .../notification/stack/NotificationStackScrollLayout.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 5cee5bd0cc4ea..2a2a0b14a2d2c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -835,7 +835,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (!mShouldDrawNotificationBackground) { return; } - + final boolean clearUndershelf = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.SHOW_NEW_NOTIF_DISMISS, 0 /* show background by default */) == 1; + if (clearUndershelf) { + mBackgroundPaint.setColor(Color.TRANSPARENT); + invalidate(); + return; + } // Interpolate between semi-transparent notification panel background color // and white AOD separator. float colorInterpolation = MathUtils.smoothStep(0.4f /* start */, 1f /* end */,