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

Commit 9e2ae3c0 authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

Merge "Use screen timeout settings of current user." into main

parents cc2332ec 57a34e17
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.communal

import android.os.UserHandle
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.provider.Settings
@@ -77,7 +78,11 @@ class CommunalSceneStartableTest : SysuiTestCase() {
    @Before
    fun setUp() {
        with(kosmos) {
            fakeSettings.putInt(Settings.System.SCREEN_OFF_TIMEOUT, SCREEN_TIMEOUT)
            fakeSettings.putIntForUser(
                Settings.System.SCREEN_OFF_TIMEOUT,
                SCREEN_TIMEOUT,
                UserHandle.USER_CURRENT,
            )
            kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)

            underTest =
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.communal

import android.os.UserHandle
import android.provider.Settings
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.TransitionKey
@@ -147,9 +148,10 @@ constructor(
            .emitOnStart()
            .onEach {
                screenTimeout =
                    systemSettings.getInt(
                    systemSettings.getIntForUser(
                        Settings.System.SCREEN_OFF_TIMEOUT,
                        DEFAULT_SCREEN_TIMEOUT,
                        UserHandle.USER_CURRENT,
                    )
            }
            .launchIn(bgScope)