Skip to content

Commit d7912d2

Browse files
committed
Don't play hint animations when dozing
Bug: 17718416 Change-Id: I2c27b4ea479ee46612eb5284a2c872d03dc52ab0
1 parent bc156ba commit d7912d2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,8 @@ public void onAnimationToSideEnded() {
15511551
@Override
15521552
protected void onEdgeClicked(boolean right) {
15531553
if ((right && getRightIcon().getVisibility() != View.VISIBLE)
1554-
|| (!right && getLeftIcon().getVisibility() != View.VISIBLE)) {
1554+
|| (!right && getLeftIcon().getVisibility() != View.VISIBLE)
1555+
|| isDozing()) {
15551556
return;
15561557
}
15571558
mHintAnimationRunning = true;
@@ -1747,6 +1748,7 @@ public void setDozing(boolean dozing) {
17471748
updateKeyguardStatusBarVisibility();
17481749
}
17491750

1751+
@Override
17501752
public boolean isDozing() {
17511753
return mDozing;
17521754
}

packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,9 @@ public void run() {
914914
private boolean onMiddleClicked() {
915915
switch (mStatusBar.getBarState()) {
916916
case StatusBarState.KEYGUARD:
917-
startUnlockHintAnimation();
917+
if (!isDozing()) {
918+
startUnlockHintAnimation();
919+
}
918920
return true;
919921
case StatusBarState.SHADE_LOCKED:
920922
mStatusBar.goToKeyguard();
@@ -932,6 +934,8 @@ private boolean onMiddleClicked() {
932934

933935
protected abstract void onEdgeClicked(boolean right);
934936

937+
protected abstract boolean isDozing();
938+
935939
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
936940
pw.println(String.format("[PanelView(%s): expandedHeight=%f maxPanelHeight=%d closing=%s"
937941
+ " tracking=%s justPeeked=%s peekAnim=%s%s timeAnim=%s%s touchDisabled=%s"

0 commit comments

Comments
 (0)