diff options
| author | 2021-06-21 14:28:25 +0000 | |
|---|---|---|
| committer | 2021-06-21 14:28:25 +0000 | |
| commit | 9c4b4c34b0cf9ea5749dd0dd2e50d12c491cf594 (patch) | |
| tree | 3ea07062624196f3aa1515f136d68f6385b7fda0 | |
| parent | e6b421ae73293545f382ec0977ce72267bbada1c (diff) | |
| parent | a0859487e4580c100bbea2ecc8d5944ecaa4ec5a (diff) | |
Merge "Dim background when group notification expanded" into sc-dev
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java index c24c2be3faa3..4f3406c405ad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java @@ -203,6 +203,14 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg); } + protected boolean hideBackground() { + return false; + } + + protected void updateBackground() { + mBackgroundNormal.setVisibility(hideBackground() ? INVISIBLE : VISIBLE); + } + @Override public boolean onInterceptTouchEvent(MotionEvent ev) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index ba28dc59def4..9d56e9b6f855 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -2890,6 +2890,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView mShowNoBackground = false; } updateOutline(); + updateBackground(); + } + + @Override + protected boolean hideBackground() { + return mShowNoBackground || super.hideBackground(); } public int getPositionOfChild(ExpandableNotificationRow childRow) { |