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

Commit 8e24c886 authored by Justin Weir's avatar Justin Weir
Browse files

Update clock on language change

Fixes: 412613840
Test: manual
Test: added unit test
Flag: EXEMPT trivial fix
Change-Id: I61d7b3a642f85c9181cbdf14c3f6a60f10c0dc88
parent bc429199
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -347,6 +347,10 @@ constructor(
            override fun onUiModeChanged() {
                updateColors()
            }

            override fun onLocaleListChanged() {
                clock.onLocaleListChanged()
            }
        }

    private val nextAlarmCallback =
+7 −0
Original line number Diff line number Diff line
@@ -324,6 +324,13 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
        verify(date).setTextAppearance(R.style.TextAppearance_QS_Status)
    }

    @Test
    fun updateLocale_clockUpdates() {
        configurationController.notifyLocaleChanged()

        verify(clock).onLocaleListChanged()
    }

    @Test
    fun animateOutOnStartCustomizing() {
        val animator = mock(ViewPropertyAnimator::class.java, Answers.RETURNS_SELF)
+4 −0
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ class FakeConfigurationController @Inject constructor() :
        listeners.forEach { it.onDensityOrFontScaleChanged() }
    }

    fun notifyLocaleChanged() {
        listeners.forEach { it.onLocaleListChanged() }
    }

    fun notifyConfigurationChanged() {
        onConfigurationChanged(newConfiguration = Configuration())
    }