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

Commit b3467f49 authored by Gavin Williams's avatar Gavin Williams
Browse files

a11y: Fix typing while autoclick enabled

Because the autoclick panel is TYPE_APPLICATION_OVERLAY, when it was enabled it
permanently held focus which prevented typing and probably caused other issues.
Setting FLAG_NOT_FOCUSABLE resolves this issue.

Demo: http://b/399872186#comment2

Bug: b/399872186
Test: AutoclickTypePanelTest
Flag: com.android.server.accessibility.enable_autoclick_indicator
Change-Id: If1f1ba54ce14a822a2177e8f891dc595c1945b0d
parent ed5b1616
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -576,7 +576,7 @@ public class AutoclickTypePanel {
    private WindowManager.LayoutParams getDefaultLayoutParams() {
        final WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
        layoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
        layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
        layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
        layoutParams.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
        layoutParams.setFitInsetsTypes(WindowInsets.Type.statusBars());
        layoutParams.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;