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

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

Merge "Rename BouncerWindowBlurTestUtil to KeyguardWindowBlurTestUtil." into main

parents a55f5b06 454be403
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ class AlternateBouncerToPrimaryBouncerTransitionViewModelTest : SysuiTestCase()
    fun notifications_areFullyVisible_whenShadeIsOpen() =
        testScope.runTest {
            val values by collectValues(underTest.notificationAlpha)
            kosmos.bouncerWindowBlurTestUtil.shadeExpanded(true)
            kosmos.keyguardWindowBlurTestUtil.shadeExpanded(true)

            keyguardTransitionRepository.sendTransitionSteps(
                listOf(
@@ -100,9 +100,9 @@ class AlternateBouncerToPrimaryBouncerTransitionViewModelTest : SysuiTestCase()
    fun blurRadiusGoesToMaximumWhenShadeIsExpanded() =
        testScope.runTest {
            val values by collectValues(underTest.windowBlurRadius)
            kosmos.bouncerWindowBlurTestUtil.shadeExpanded(true)
            kosmos.keyguardWindowBlurTestUtil.shadeExpanded(true)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0f, 0f, 0.1f, 0.2f, 0.3f, 1f),
                startValue = kosmos.blurConfig.maxBlurRadiusPx,
                endValue = kosmos.blurConfig.maxBlurRadiusPx,
@@ -119,9 +119,9 @@ class AlternateBouncerToPrimaryBouncerTransitionViewModelTest : SysuiTestCase()
        testScope.runTest {
            val values by collectValues(underTest.notificationBlurRadius)

            kosmos.bouncerWindowBlurTestUtil.shadeExpanded(true)
            kosmos.keyguardWindowBlurTestUtil.shadeExpanded(true)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0f, 0f, 0.1f, 0.2f, 0.3f, 1f),
                startValue = kosmos.blurConfig.maxBlurRadiusPx / 3.0f,
                endValue = kosmos.blurConfig.maxBlurRadiusPx / 3.0f,
@@ -135,9 +135,9 @@ class AlternateBouncerToPrimaryBouncerTransitionViewModelTest : SysuiTestCase()
    fun blurRadiusGoesFromMinToMaxWhenShadeIsNotExpanded() =
        testScope.runTest {
            val values by collectValues(underTest.windowBlurRadius)
            kosmos.bouncerWindowBlurTestUtil.shadeExpanded(false)
            kosmos.keyguardWindowBlurTestUtil.shadeExpanded(false)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0f, 0f, 0.1f, 0.2f, 0.3f, 1f),
                startValue = kosmos.blurConfig.minBlurRadiusPx,
                endValue = kosmos.blurConfig.maxBlurRadiusPx,
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ class AodToPrimaryBouncerTransitionViewModelTest : SysuiTestCase() {
        testScope.runTest {
            val values by collectValues(underTest.windowBlurRadius)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0.0f, 0.0f, 0.3f, 0.4f, 0.5f, 1.0f),
                startValue = kosmos.blurConfig.maxBlurRadiusPx,
                endValue = kosmos.blurConfig.maxBlurRadiusPx,
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ class DozingToPrimaryBouncerTransitionViewModelTest : SysuiTestCase() {
        testScope.runTest {
            val values by collectValues(underTest.windowBlurRadius)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0.0f, 0.2f, 0.3f, 0.65f, 0.7f, 1.0f),
                startValue = kosmos.blurConfig.minBlurRadiusPx,
                endValue = kosmos.blurConfig.maxBlurRadiusPx,
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class GlanceableHubToPrimaryBouncerTransitionViewModelTest : SysuiTestCase() {
        testScope.runTest {
            val values by collectValues(underTest.windowBlurRadius)

            kosmos.bouncerWindowBlurTestUtil.assertTransitionToBlurRadius(
            kosmos.keyguardWindowBlurTestUtil.assertTransitionToBlurRadius(
                transitionProgress = listOf(0.0f, 0.2f, 0.3f, 0.65f, 0.7f, 1.0f),
                startValue = kosmos.blurConfig.maxBlurRadiusPx,
                endValue = kosmos.blurConfig.maxBlurRadiusPx,
+3 −3
Original line number Diff line number Diff line
@@ -33,9 +33,9 @@ import com.android.systemui.shade.shadeTestUtil
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.TestScope

val Kosmos.bouncerWindowBlurTestUtil by
val Kosmos.keyguardWindowBlurTestUtil by
    Kosmos.Fixture {
        BouncerWindowBlurTestUtil(
        KeyguardWindowBlurTestUtil(
            shadeTestUtil = shadeTestUtil,
            fakeKeyguardTransitionRepository = fakeKeyguardTransitionRepository,
            fakeKeyguardRepository = fakeKeyguardRepository,
@@ -43,7 +43,7 @@ val Kosmos.bouncerWindowBlurTestUtil by
        )
    }

class BouncerWindowBlurTestUtil(
class KeyguardWindowBlurTestUtil(
    private val shadeTestUtil: ShadeTestUtil,
    private val fakeKeyguardTransitionRepository: FakeKeyguardTransitionRepository,
    private val fakeKeyguardRepository: FakeKeyguardRepository,
Loading