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

Commit 921a2d79 authored by Roy Chou's avatar Roy Chou
Browse files

feat(magnification): do not always turn off magnification when features...

feat(magnification): do not always turn off magnification when features changing in AccessibilityInputFilter

Per b/384855743, when talkback on/off the AccessibilityInputFilter
recreates the MagnificationGestureHandler, but when handler#onDestroy
it reset the magnification. This also happens when turn on/off the s2s
FAB. The behavior may not be expected since the user action is not
related to the magnification, and the service still support the
magnification functionality, so maybe we should keep the magnification
zooming for these scenario.

Thus, when AccessibilityInputFilter try to destroy and recreate a new
MagnificationGestureHandler, we first check the magnification status
and decide whether the destory needs to reset the magnification. If not,
in MagnificationGestureHandler#onDestroy, we will not reset the binded
magnification controller.

Bug: 417633371
Test: manually flip flags
      atest AccessibilityInputFilterTest
Flag: com.android.server.accessibility.only_reset_magnification_if_needed_when_destroy_handler
Change-Id: Ia33330ca628ab8102f044667d0b15e9fcd379d4e
parent 5d4bb243
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment