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

Skip to content
Commit 0c1c8779 authored by Roy Chou's avatar Roy Chou
Browse files

fix(#AlwaysOnMagnifier): Fix testSetConfigWithActivatedFalse_expectedConfig fails

If setMagnificationConfig is called when WindowMagnificationSettings instance does not exist, the settings instance will be created. The WindowMagnificationSettings constructor would set up the scale seek bar progress with user persisted scale, and thus the seek bar would trigger the progress updated callback. When callback is triggered,
 the window magnifier scale would be set to seek bar scale, which may not be the same as the config target scale. Therefore, the result might not be correct.

Therefore, in WindowMagnificationSettings, we modify the setup order to make the seek bar progress setup before the seek bar callback setup. It prevents the progress setup from triggering callback and thus changing the window magnifier scale.

Bug: 267691832
Test: atest WindowMagnificationSettingsTest
      atest AccessibilityMagnificationTest
      treehugger presubmit
Change-Id: I519d2b7be6691715a49ec6d368f9f103f8681359
parent 3ba57951
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment