Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a94e9648 authored by Adrian Roos's avatar Adrian Roos
Browse files

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.
parent 1e3b49c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);