Fix the layout flag for magnification settings

Adding the flag FLAG_NOT_FOCUSABLE to enable interaction with the
screen below the layer of settings panel. The logic of requesting focus
on the settings panel when it is opened is also removed since
requestFocus does not work on the view with the flag.

Bug: 241996711
Test: manually - attach videos to the bug
Test: atest WindowMagnificationSettingsTest
Change-Id: Ib0aac29a27de14b1fa35b87fa840dd56ae00be6b
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
index 9ad64e2..fb701ae 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
@@ -354,10 +354,6 @@
             }
 
             mWindowManager.addView(mSettingView, mParams);
-            if (resetPosition) {
-                // Request focus on the settings panel when position of the panel is reset.
-                mSettingView.requestFocus();
-            }
 
             // Exclude magnification switch button from system gesture area.
             setSystemGestureExclusion();
@@ -536,7 +532,7 @@
                 LayoutParams.WRAP_CONTENT,
                 LayoutParams.WRAP_CONTENT,
                 LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY,
-                /* _flags= */ 0,
+                LayoutParams.FLAG_NOT_FOCUSABLE,
                 PixelFormat.TRANSPARENT);
         params.gravity = Gravity.TOP | Gravity.START;
         params.accessibilityTitle = getAccessibilityWindowTitle(context);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationSettingsTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationSettingsTest.java
index 52a70ee..47c9191 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationSettingsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationSettingsTest.java
@@ -201,13 +201,6 @@
         assertThat(magnifierMediumButton.isSelected()).isTrue();
     }
 
-    @Test
-    public void showSettingPanel_focusOnThePanel() {
-        mWindowMagnificationSettings.showSettingPanel();
-
-        assertThat(mSettingView.isFocused()).isTrue();
-    }
-
     private <T extends View> T getInternalView(@IdRes int idRes) {
         T view = mSettingView.findViewById(idRes);
         assertNotNull(view);