diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-08-26 18:18:04 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-26 18:18:04 -0700 |
commit | d96dbbe3356d6863c13134e545d281a56443f9b1 (patch) | |
tree | 1af3f856e4b44770961d0bc24b1962984012e706 /policy | |
parent | 28c5b96d840c24947fd29f2e65646ff37f5dc7ff (diff) | |
parent | 2e1db30d18a0ff6640bb0ad61f922ec1fdcf5a3c (diff) | |
download | frameworks_base-d96dbbe3356d6863c13134e545d281a56443f9b1.zip frameworks_base-d96dbbe3356d6863c13134e545d281a56443f9b1.tar.gz frameworks_base-d96dbbe3356d6863c13134e545d281a56443f9b1.tar.bz2 |
Merge "Lock screen should be kept on while it is touch explored."
Diffstat (limited to 'policy')
-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 2d90727..70772eb 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) |