From a94e9648ae9c958d850043e7805dcadfb5acd700 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 17 Aug 2017 17:29:19 +0200 Subject: [PATCH] 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. --- .../src/com/android/systemui/statusbar/phone/LockIcon.java | 4 ++-- 1 file 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 c24129079d4ff..5c9446ce86727 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);