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

Commit c9bb92af authored by George Lin's avatar George Lin
Browse files

Handle back navigation on clock font customization

Test: Manually tested that back gesture goes back to clock style
Bug: 350718184
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: Ie0807b527103acfbe031f477c022760b6552ba54
parent 83bcf350
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -62,6 +62,16 @@ constructor(
    override val selectedOption = defaultCustomizationOptionsViewModel.selectedOption

    override fun handleBackPressed(): Boolean {

        if (
            defaultCustomizationOptionsViewModel.selectedOption.value ==
                ThemePickerCustomizationOptionUtil.ThemePickerLockCustomizationOption.CLOCK &&
                clockPickerViewModel.selectedTab.value == ClockPickerViewModel.Tab.FONT
        ) {
            clockPickerViewModel.cancelFontAxes()
            return true
        }

        val isBackPressedHandled = defaultCustomizationOptionsViewModel.handleBackPressed()

        if (isBackPressedHandled) {