diff options
| author | 2011-08-25 11:11:35 -0700 | |
|---|---|---|
| committer | 2011-08-25 11:11:40 -0700 | |
| commit | 2e1db30d18a0ff6640bb0ad61f922ec1fdcf5a3c (patch) | |
| tree | 991ac89c1e3b19298704fcff1d64bdd0e57d01eb | |
| parent | f874c4f93437cbbef7a915a36d5abb448e1e3209 (diff) | |
Lock screen should be kept on while it is touch explored.
1. The lock screen goes off after a certain timeout but a blind
user performing touch exploration of that screen needs more
time to find controls and interact with them. Therfore, we
reset the lock timeout by poking the wake lock on the last
hover event so the lock timeout will start ticking after
the user has stopped interacting with the lock screen.
bug:5133879
Change-Id: I340d2a820e90f6fd63a45d65a5457ce6e570189c
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 2d90727a0e02..70772eb553b2 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -44,8 +44,10 @@ import android.text.TextUtils; import android.util.Log; import android.util.Slog; import android.view.KeyEvent; +import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; +import android.view.accessibility.AccessibilityManager; import java.io.IOException; @@ -510,6 +512,18 @@ public class LockPatternKeyguardView extends KeyguardViewBase { } @Override + protected boolean dispatchHoverEvent(MotionEvent event) { + // Do not let the screen to get locked while the user is disabled and touch + // exploring. A blind user will need significantly more time to find and + // interact with the lock screen views. + AccessibilityManager accessibilityManager = AccessibilityManager.getInstance(mContext); + if (accessibilityManager.isEnabled() && accessibilityManager.isTouchExplorationEnabled()) { + getCallback().pokeWakelock(); + } + return super.dispatchHoverEvent(event); + } + + @Override public void wakeWhenReadyTq(int keyCode) { if (DEBUG) Log.d(TAG, "onWakeKey"); if (keyCode == KeyEvent.KEYCODE_MENU && isSecure() && (mMode == Mode.LockScreen) |