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

Commit 5f2ad9a7 authored by Gavin Williams's avatar Gavin Williams
Browse files

Autoclick: Change panel layout type

Using TYPE_NAVIGATION_BAR_PANEL allows for the panel to be showed on the
lock screen. This matches the implementation of the a11y Magnification
window settings which is also available on the lock screen.

Bug: 432062178
Test: AutoclickPanelTests
Flag: com.android.server.accessibility.enable_autoclick_indicator
Change-Id: Ic6bcc5330c438e4c6661365ebedfaec99f328942
parent 65388286
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ public class AutoclickScrollPanel {
    @NonNull
    private WindowManager.LayoutParams getDefaultLayoutParams() {
        final WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
        layoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
        layoutParams.type = WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
        layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
        layoutParams.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
        layoutParams.setFitInsetsTypes(
+1 −2
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.view.WindowManager;

import androidx.annotation.VisibleForTesting;

import com.android.internal.R;

/**
 * A custom view that displays a circular visual indicator at the scroll cursor's location.
@@ -123,7 +122,7 @@ public class AutoclickScrollPointIndicator extends View {
     */
    public WindowManager.LayoutParams getLayoutParams() {
        final WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
        layoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
        layoutParams.type = WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
        layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+1 −1
Original line number Diff line number Diff line
@@ -1006,7 +1006,7 @@ public class AutoclickTypePanel {
    @NonNull
    private WindowManager.LayoutParams getDefaultLayoutParams() {
        final WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
        layoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
        layoutParams.type = WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
        layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
        layoutParams.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;