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
Loading
Please register or sign in to comment