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

Commit e1f2f98e authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

Listen for LOCKSCREEN_USE_DOUBLE_LINE_CLOCK changes on all users

KeyguardClockSwitchController already uses USER_ALL for it's equivalent
listener. Looks like we missed this detial when writing the new code.

Also spotted a usage of LOCK_SCREEN_WEATHER_ENABLED that wouldn't update
to listen to the current user correctly.

Bug: 359619301
Test: Manual, existing presubmits
Flag: NONE Minor bugfix
Change-Id: Ifc5a17ef1fb385db0a093941601a7681b9f649b0
parent a776451e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ constructor(
        secureSettings
            .observerFlow(
                names = arrayOf(Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK),
                userId = UserHandle.USER_SYSTEM,
                userId = UserHandle.USER_ALL,
            )
            .onStart { emit(Unit) } // Forces an initial update.
            .map { withContext(backgroundDispatcher) { getClockSize() } }
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.data.repository

import android.content.Context
import android.os.UserHandle
import android.provider.Settings
import android.view.View
import com.android.systemui.dagger.SysUISingleton
@@ -37,6 +38,7 @@ import kotlinx.coroutines.flow.stateIn
interface KeyguardSmartspaceRepository {
    val bcSmartspaceVisibility: StateFlow<Int>
    val isWeatherEnabled: StateFlow<Boolean>

    fun setBcSmartspaceVisibility(visibility: Int)
}

@@ -55,7 +57,7 @@ constructor(
        secureSettings
            .observerFlow(
                names = arrayOf(Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED),
                userId = userTracker.userId,
                userId = UserHandle.USER_ALL,
            )
            .onStart { emit(Unit) }
            .map { getLockscreenWeatherEnabled() }