Ambient Indication: Add supporting infrastructure
Adds a stub for inflating the ambient indication. Also
adds some logic to the panel view to avoid the
indication by showing fewer notification while it's
there.
Bug: 36777988
Test: m SystemUI
Change-Id: Ifee218860a7561d77edf0f71a17e02c975132597
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index f1b4498..a6e5667 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -211,6 +211,7 @@
private NotificationGroupManager mGroupManager;
private boolean mShowIconsWhenExpanded;
private int mIndicationBottomPadding;
+ private int mAmbientIndicationBottomPadding;
private boolean mIsFullWidth;
private boolean mDark;
private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
@@ -425,7 +426,7 @@
float shelfSize = mNotificationStackScroller.getNotificationShelf().getIntrinsicHeight()
+ notificationPadding;
float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize
- - mIndicationBottomPadding;
+ - Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding);
int count = 0;
for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {
ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);
@@ -2476,4 +2477,11 @@
public void setPulsing(boolean pulsing) {
mKeyguardStatusView.setPulsing(pulsing);
}
+
+ public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) {
+ if (mAmbientIndicationBottomPadding != ambientIndicationBottomPadding) {
+ mAmbientIndicationBottomPadding = ambientIndicationBottomPadding;
+ mStatusBar.updateKeyguardMaxNotifications();
+ }
+ }
}