diff options
author | John Spurlock <jspurlock@google.com> | 2014-05-23 11:00:34 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-05-23 11:03:05 -0400 |
commit | d08f91fa679d3045436e993b6073d86d8f9b26fe (patch) | |
tree | 5ca7100a7c4227c18ae83ef4bf67328ee6a0d53b | |
parent | 470c1accf5a54f9844a779eafab74e63c09342b5 (diff) | |
download | frameworks_base-d08f91fa679d3045436e993b6073d86d8f9b26fe.zip frameworks_base-d08f91fa679d3045436e993b6073d86d8f9b26fe.tar.gz frameworks_base-d08f91fa679d3045436e993b6073d86d8f9b26fe.tar.bz2 |
QS: Reset user activity timeout on the lockscreen.
If the quick settings panel changes, call userActivity to
delay the screen timeout.
Bug:15166195
Change-Id: Ie32fb39c5a975d9cf0d80d7fdf711177028a6b5c
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java | 1 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 14 |
2 files changed, 12 insertions, 3 deletions
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 142241c..0a44904 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -478,6 +478,7 @@ public class NotificationPanelView extends PanelView implements mHeader.setExpansion(height); setQsTranslation(height); setQsStackScrollerPadding(height); + mStatusBar.userActivity(); } private void setQsTranslation(float height) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 772681e..152ca3f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2779,9 +2779,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void userActivity() { - if (mState == StatusBarState.KEYGUARD) { - mKeyguardViewMediatorCallback.userActivity(); - } + mHandler.removeCallbacks(mUserActivity); + mHandler.post(mUserActivity); } public boolean interceptMediaKey(KeyEvent event) { @@ -2939,4 +2938,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onScreenTurnedOn() { mStackScroller.setAnimationsEnabled(true); } + + private final Runnable mUserActivity = new Runnable() { + @Override + public void run() { + if (mState == StatusBarState.KEYGUARD) { + mKeyguardViewMediatorCallback.userActivity(); + } + } + }; } |