Commit Graph

3 Commits

Author SHA1 Message Date
Roy Chou
1c898252cb fix(magnification): make always on toggle unavailable when capabilities is window only
As b/328787031, we make the MagnificationAlwaysOnPreferenceController observe the magnification capabilities then update the preference enabled state. Therefore, when changing the capabilities to window mode only, the preference will become unavailable.

We use the bug-fix flag to verify the fix with rollout process.

Bug: 328787031
Flag: ACONFIG com.android.settings.accessibility.hide_magnification_always_on_toggle_when_window_mode_only DEVELOPMENT
Test: manually flip the flag
      atest MagnificationCapabilitiesTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationAlwaysOnPreferenceControllerTest
Change-Id: I1a25f80131d84ecdd927030e40a18ebb32b7862f
2024-03-26 05:11:06 +00:00
Roy Chou
654e43b2e8 chore(magnification): remove onResume overrides for controllers in ToggleScreenMagnificationPreferenceFragment
As b/186731461, so far MagnificationModePreferenceController and other
magnification preference controllers are only used in
ToggleScreenMagnificationPreferenceFragment, which is DashboardFragment.
Since DashboardFragment already updates preference state in its
onResume, so we can remove the onResume overrides in those controllers.
Besides, we can also remove the LifeCycle dependency for the controllers
since it's not used anymore.

Bug: 186731461
Flag: NA
Test: manually
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationAlwaysOnPreferenceControllerTest
      atest MagnificationFollowTypingPreferenceControllerTest
      atest MagnificationJoystickPreferenceControllerTest
      atest MagnificationModePreferenceControllerTest
Change-Id: I379a6a3a985c9d8b7a37bbb878b84cee1bd6adfb
2024-03-04 03:44:59 +00:00
Tyler Freeman
193b366ed6 feat(#AlwaysOnMagnifier): add preference for enabling Always On Magnification to Settings
Hide behind feature flag so no one sees the preference unless its enabled.

Defaults to enabled.

Bug: b/265086261

Test: manual

Change-Id: Ic32353f2b139772fe905137c9ec137925ef6ebb9
2023-01-31 21:48:49 +00:00