AOD: show AOD1 instead of AOD2 on double tap

Bug: 30876804
Test: Have a notification showing, turn off screen, double-tap to Ambient Display, observe that device shows only the time and notification icon, not the expanded notification
Change-Id: Ic9b9fc392b67b0411588c1287cdf61ca2397990d
This commit is contained in:
Adrian Roos
2017-02-13 15:05:03 +01:00
parent f49f3482de
commit b2a872906c
3 changed files with 12 additions and 2 deletions

View File

@@ -72,6 +72,9 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener {
* @param pulsing whether we are currently pulsing for ambient display.
*/
public void setPulsing(boolean pulsing) {
if (mPulsing == pulsing) {
return;
}
mPulsing = pulsing;
updateReorderingAllowed();
}

View File

@@ -5005,8 +5005,12 @@ public class StatusBar extends SystemUI implements DemoMode,
@Override
public void onPulseStarted() {
callback.onPulseStarted();
mStackScroller.setPulsing(true);
mVisualStabilityManager.setPulsing(true);
if (!mHeadsUpManager.getAllEntries().isEmpty()) {
// Only pulse the stack scroller if there's actually something to show.
// Otherwise just show the always-on screen.
mStackScroller.setPulsing(true);
mVisualStabilityManager.setPulsing(true);
}
}
@Override

View File

@@ -4026,6 +4026,9 @@ public class NotificationStackScrollLayout extends ViewGroup
}
public void setPulsing(boolean pulsing) {
if (mPulsing == pulsing) {
return;
}
mPulsing = pulsing;
updateNotificationAnimationStates();
updateContentHeight();