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