Merge "Dim background when group notification expanded" into sc-dev am: 9c4b4c34b0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15022247

Change-Id: I716115944b037b2aff5057d576e2414a587f4b48
This commit is contained in:
Jeff DeCew
2021-06-21 14:44:47 +00:00
committed by Automerger Merge Worker
2 changed files with 14 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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) {