Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/layout/ui/viewmodel/StatusBarContentInsetsViewModelTest.kt +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.systemui.statusbar.layout.ui.viewmodel import android.content.res.Configuration import android.platform.test.annotations.EnableFlags import android.view.Display import android.view.Surface import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase Loading @@ -30,10 +32,12 @@ import com.android.systemui.statusbar.layout.statusBarContentInsetsProvider import com.android.systemui.statusbar.policy.configurationController import com.android.systemui.statusbar.policy.fake import com.android.systemui.testKosmos import com.android.systemui.util.mockito.mock import com.google.common.truth.Truth.assertThat import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @SmallTest Loading @@ -57,6 +61,13 @@ class StatusBarContentInsetsViewModelTest : SysuiTestCase() { val values by collectValues(underTest.contentArea) // WHEN the content area changes // changing to RTL is not sufficient to trigger a different contentArea if the privacy // chip and corner rounding are the same, so we'll also rotate the display val mockDisplay = mock<Display>() context.display = mockDisplay whenever(mockDisplay.getRotation()).thenReturn(Surface.ROTATION_90) configurationController.fake.notifyLayoutDirectionChanged(isRtl = true) configurationController.fake.notifyDensityOrFontScaleChanged() Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/layout/ui/viewmodel/StatusBarContentInsetsViewModelTest.kt +11 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.systemui.statusbar.layout.ui.viewmodel import android.content.res.Configuration import android.platform.test.annotations.EnableFlags import android.view.Display import android.view.Surface import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase Loading @@ -30,10 +32,12 @@ import com.android.systemui.statusbar.layout.statusBarContentInsetsProvider import com.android.systemui.statusbar.policy.configurationController import com.android.systemui.statusbar.policy.fake import com.android.systemui.testKosmos import com.android.systemui.util.mockito.mock import com.google.common.truth.Truth.assertThat import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @SmallTest Loading @@ -57,6 +61,13 @@ class StatusBarContentInsetsViewModelTest : SysuiTestCase() { val values by collectValues(underTest.contentArea) // WHEN the content area changes // changing to RTL is not sufficient to trigger a different contentArea if the privacy // chip and corner rounding are the same, so we'll also rotate the display val mockDisplay = mock<Display>() context.display = mockDisplay whenever(mockDisplay.getRotation()).thenReturn(Surface.ROTATION_90) configurationController.fake.notifyLayoutDirectionChanged(isRtl = true) configurationController.fake.notifyDensityOrFontScaleChanged() Loading