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

Commit e16764d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix for some devices" into main

parents faa18036 51f9467e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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
@@ -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
@@ -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()