From 19e5d0c593918a76522b5285b86c53913cbde20e Mon Sep 17 00:00:00 2001 From: Roy Chou Date: Tue, 17 Dec 2024 15:06:53 +0000 Subject: [PATCH] chore(magnification): remove the PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION window flag usage in Launcher app As the bug, in some case the launcher taskbar is visible but the taskbar window is flagged with PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION, so the magnification consumes the gesture events on the taskabr, then the accessibility gesture shortcut cannot take effect. The flag was introduced in Launcher to fix the fullscreen magnification border cutting/overlapping with taskbar issue. Since we already migrate the fullscreen border to sysui and make it always fit the screen, regardless the magnification regions, so we can remove the flag usage in Launcher to solve the bug and do not affect the fullscreen border layout correctness. We'll use a bugfix feature flag to gradually rollout this change. To test the fix, on LargeScreen devices, we can enable accessibility gesture shortcut and disable the "keep on while switching apps" toggle in Magnification Settings page, then in any app we use the 2 finger swipe gestures to try activate/deactivate the magnification. When the flag is off, swipe gesture can not successfully deactivate the magnification, while the flah is on it work. (attached records in bug) Bug: 369019568 Flag: com.android.launcher3.remove_exclude_from_screen_magnification_flag_usage Test: manually (see message above) Change-Id: I469189a2288d0ddbfb5a5d9e02a78366870ce5b1 --- aconfig/launcher_accessibility.aconfig | 12 ++++++++++++ .../launcher3/taskbar/TaskbarActivityContext.java | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 aconfig/launcher_accessibility.aconfig diff --git a/aconfig/launcher_accessibility.aconfig b/aconfig/launcher_accessibility.aconfig new file mode 100644 index 0000000000..afee8fe6be --- /dev/null +++ b/aconfig/launcher_accessibility.aconfig @@ -0,0 +1,12 @@ +package: "com.android.launcher3" +container: "system" + +flag { + name: "remove_exclude_from_screen_magnification_flag_usage" + namespace: "accessibility" + description: "Remove the WindowManager PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION flag usage in Launcher" + bug: "369019568" + metadata { + purpose: PURPOSE_BUGFIX + } +} \ No newline at end of file diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index 8149f8139c..7a0af1dfd4 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -29,6 +29,7 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_ON_BOARD_POPUP; import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_OVERLAY_PROXY; import static com.android.launcher3.Flags.enableCursorHoverStates; +import static com.android.launcher3.Flags.removeExcludeFromScreenMagnificationFlagUsage; import static com.android.launcher3.Utilities.calculateTextHeight; import static com.android.launcher3.Utilities.isRunningInTestHarness; import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_NAVBAR_UNIFICATION; @@ -1783,6 +1784,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { return; } + if (removeExcludeFromScreenMagnificationFlagUsage()) { + return; + } + mIsExcludeFromMagnificationRegion = exclude; if (exclude) { mWindowLayoutParams.privateFlags |=