Skip to content

Commit a1b8416

Browse files
John SpurlockAndroid (Google) Code Review
authored andcommitted
Merge "Don't play hint animations when dozing" into lmp-dev
2 parents e7b18d2 + d7912d2 commit a1b8416

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
@@ -915,7 +915,9 @@ public void run() {
915915
private boolean onMiddleClicked() {
916916
switch (mStatusBar.getBarState()) {
917917
case StatusBarState.KEYGUARD:
918-
startUnlockHintAnimation();
918+
if (!isDozing()) {
919+
startUnlockHintAnimation();
920+
}
919921
return true;
920922
case StatusBarState.SHADE_LOCKED:
921923
mStatusBar.goToKeyguard();
@@ -933,6 +935,8 @@ private boolean onMiddleClicked() {
933935

934936
protected abstract void onEdgeClicked(boolean right);
935937

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

0 commit comments

Comments
 (0)