summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2017-08-17 17:29:19 +0200
committer Adrian Roos <roosa@google.com> 2017-08-17 17:35:03 +0200
commita94e9648ae9c958d850043e7805dcadfb5acd700 (patch)
tree94e905711f87fb4106608533210911dbb6eb172c
parent1e3b49c104300c0f68ec506e4f457640c434afe3 (diff)
AOD: Fix LockIcon click handler
Fixes an issue where the click action of the LockIcon was inconsistently handled: - clickable if touch exploration or trust agent is active - click action is unlock if accessibility enabled This lead to a bug where unlocking with an accessibility service on that icon was not possible unless a trust agent or touch exploration was enabled. Change-Id: I3141afb8ed7ed5a07481f6ae35477f0e11cc5b02 Fixes: 37363764 Test: Enable accessibility and trust agent, verify click disables trust instead of unlocking.
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index c24129079d4f..5c9446ce8672 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -207,9 +207,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
if (mAccessibilityController == null) {
return;
}
- boolean clickToUnlock = mAccessibilityController.isTouchExplorationEnabled();
+ boolean clickToUnlock = mAccessibilityController.isAccessibilityEnabled();
boolean clickToForceLock = mUnlockMethodCache.isTrustManaged()
- && !mAccessibilityController.isAccessibilityEnabled();
+ && !clickToUnlock;
boolean longClickToForceLock = mUnlockMethodCache.isTrustManaged()
&& !clickToForceLock;
setClickable(clickToForceLock || clickToUnlock);