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

Commit 33d02336 authored by Hawkwood Glazier's avatar Hawkwood Glazier Committed by Automerger Merge Worker
Browse files

Merge "Cache and resend weather data when the clock changes" into udc-dev am:...

Merge "Cache and resend weather data when the clock changes" into udc-dev am: c99c3030 am: 1e1e9d0e am: 0f2a9b71

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23220041



Change-Id: I7eeb33a1190ae7d4fa501508baa19e4d1986b266
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 04d06258 0f2a9b71
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ constructor(
                }
                updateFontSizes()
                updateTimeListeners()
                cachedWeatherData?.let { value.events.onWeatherDataChanged(it) }
                value.smallClock.view.addOnAttachStateChangeListener(
                    object : OnAttachStateChangeListener {
                        override fun onViewAttachedToWindow(p0: View?) {
@@ -239,6 +240,7 @@ constructor(
    var largeTimeListener: TimeListener? = null
    val shouldTimeListenerRun: Boolean
        get() = isKeyguardVisible && dozeAmount < DOZE_TICKRATE_THRESHOLD
    private var cachedWeatherData: WeatherData? = null

    private var smallClockIsDark = true
    private var largeClockIsDark = true
@@ -305,6 +307,7 @@ constructor(
            }

            override fun onWeatherDataChanged(data: WeatherData) {
                cachedWeatherData = data
                clock?.run { events.onWeatherDataChanged(data) }
            }
        }