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

Commit 2a6b4daf authored by Treehugger Robot's avatar Treehugger Robot Committed by Gauri Shankar
Browse files

Updated global_actions_lite_background color for Light theme used in PowerDialogBackground

Bug: 419160206
Flag: EXEMPT simple color update
Test: Tested Manually
Change-Id: I59648274416f9f1c72353ca391c302f2d64e9904
parents f609374f c0bba90f
Loading
Loading
Loading
Loading
+28 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.kosmos.runCurrent
import com.android.systemui.kosmos.runTest
import com.android.systemui.kosmos.testScope
import com.android.systemui.lifecycle.activateIn
import com.android.systemui.res.R
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import org.junit.Before
@@ -160,7 +161,7 @@ class FlashlightSliderViewModelTest : SysuiTestCase() {
        }

    @Test
    fun updateInteractor_updatesState() =
    fun updateInteractor_updatesLevel() =
        kosmos.runTest {
            flashlightInteractor.setEnabled(true)
            runCurrent()
@@ -196,6 +197,32 @@ class FlashlightSliderViewModelTest : SysuiTestCase() {
            assertThat(underTest.currentFlashlightLevel!!.level).isEqualTo(MAX_LEVEL)
        }

    @Test
    fun flashlightIsAdjustable_turnsTrueAfterInitialization() =
        kosmos.runTest {
            assertThat(underTest.isFlashlightAdjustable).isFalse()

            runCurrent()

            assertThat(underTest.isFlashlightAdjustable).isTrue()
        }

    @Test
    fun testCorrectFlashlightIconForDifferentPercentages() =
        kosmos.runTest {
            assertThat(FlashlightSliderViewModel.getIconForPercentage(0f))
                .isEqualTo(R.drawable.vd_flashlight_off)

            assertThat(FlashlightSliderViewModel.getIconForPercentage(1f))
                .isEqualTo(R.drawable.vd_flashlight_on)

            assertThat(FlashlightSliderViewModel.getIconForPercentage(99f))
                .isEqualTo(R.drawable.vd_flashlight_on)

            assertThat(FlashlightSliderViewModel.getIconForPercentage(100f))
                .isEqualTo(R.drawable.vd_flashlight_on)
        }

    private companion object {
        const val MAX_LEVEL = 45
        const val DEFAULT_LEVEL = 21
+3 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <corners android:radius="28dp" />
    <solid android:color="@color/global_actions_lite_button_background" />
    <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest" />
</shape>
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@
* limitations under the License.
*/
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
  <solid android:color="@color/global_actions_lite_background"/>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
  <solid android:color="@androidprv:color/materialColorSurfaceContainerLow"/>
  <corners android:radius="@dimen/global_actions_corner_radius" />
</shape>
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
*/
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:shape="oval">
  <solid android:color="@color/global_actions_lite_button_background"/>
  <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest"/>
</shape>
+3 −2
Original line number Diff line number Diff line
@@ -15,10 +15,11 @@
    limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <item android:state_focused="false" >
        <shape android:shape="oval">
            <solid android:color="@color/global_actions_lite_button_background"/>
            <solid android:color="@androidprv:color/materialColorSurfaceContainerHighest"/>
        </shape>
    </item>
    <item android:state_focused="true" >
Loading