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

Commit 59002e79 authored by Beverly's avatar Beverly
Browse files

Add click listeners to the lock icon for a11y

Test: manual
Fixes: 215294494
Fixes: 215293909
Change-Id: Iec46136a15efd2fa7100745bc7b426178f2cc19d
parent b78bf4e4
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -211,6 +211,23 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
        mDownDetected = false;
        updateBurnInOffsets();
        updateVisibility();

        updateAccessibility();
    }

    private void updateAccessibility() {
        if (mAccessibilityManager.isTouchExplorationEnabled()) {
            mView.setOnClickListener(
                    new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            onLongPress();
                        }
                    }
            );
        } else {
            mView.setOnClickListener(null);
        }
    }

    @Override