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

Skip to content
Commit 5892d5f6 authored by chihtinglo's avatar chihtinglo Committed by Candice
Browse files

fix(magnification): Clear button status when restoring the window size

Store the MagnificationSize index and the width and height of window
magnifier in Preference.
While restoring the window magnifier, we check whether the window
preference is kept before:
Case(1)- No preference for current density: Use the default window size
Case(2)- Found invalid preference data format: Use the default window
size
Case(3)- Found valid preference with index CUSTOM: Restore window width and height
preference for current density
Case(4)- Found valid preference with non-CUSTON index: Restore window
width and height via calculation with MagnificationSize index
After restoring the window size, we send a callback to
WindowMagnificationSettings to update the correcponding button selection.

Bug: 325567876
Bug: 348317974
Test: atest WindowMagnificationFrameSpecTest
      atest WindowMagnificationFrameSizePrefsTest
      atest WindowMagnificationControllerWindowlessMagnifierTest
      atest MagnificationTest
Flag: com.android.systemui.save_and_restore_magnification_settings_buttons
Change-Id: Id0c955602a29152b8078eb1cad848beb6d1bb1ae
parent b0c75b2d
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