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

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

Merge "Move com.android.systemui.status_bar_connected_displays to...

Merge "Move com.android.systemui.status_bar_connected_displays to com.android.systemui.shared" into main
parents accc0411 19617222
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

package com.android.systemui.statusbar.core

import com.android.systemui.Flags
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.RefactorFlagUtils
import com.android.systemui.shared.Flags

/** Helper for reading or using the status bar connected displays flag state. */
@Suppress("NOTHING_TO_INLINE")
+13 −18
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.widget.FrameLayout
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
import com.android.systemui.Flags as AconfigFlags
import com.android.systemui.SysuiTestCase
import com.android.systemui.SysuiTestableContext
import com.android.systemui.battery.BatteryMeterView
@@ -52,7 +51,9 @@ import com.android.systemui.shade.ShadeViewController
import com.android.systemui.shade.StatusBarLongPressGestureDetector
import com.android.systemui.shade.display.StatusBarTouchShadeDisplayPolicy
import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor
import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround
import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.core.StatusBarConnectedDisplays
import com.android.systemui.statusbar.data.repository.fakeStatusBarContentInsetsProviderStore
import com.android.systemui.statusbar.policy.Clock
import com.android.systemui.statusbar.policy.ConfigurationController
@@ -287,7 +288,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @DisableFlags(AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    @DisableFlags(StatusBarConnectedDisplays.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnPrimaryDisplay_statusBarConnectedDisplaysDisabled_shadeReceivesEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -299,10 +300,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(
        AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS,
        AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND,
    )
    @EnableFlags(StatusBarConnectedDisplays.FLAG_NAME, ShadeWindowGoesAround.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnPrimaryDisplay_statusBarConnectedDisplaysEnabled_shadeWindowGoesAroundEnabled_shadeReceivesEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -314,8 +312,8 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    @DisableFlags(AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND)
    @EnableFlags(StatusBarConnectedDisplays.FLAG_NAME)
    @DisableFlags(ShadeWindowGoesAround.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnPrimaryDisplay_statusBarConnectedDisplaysEnabled_shadeWindowGoesAroundDisabled_shadeReceivesEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -327,7 +325,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @DisableFlags(AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    @DisableFlags(StatusBarConnectedDisplays.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnSecondaryDisplay_statusBarConnectedDisplaysDisabled_shadeReceivesEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -339,10 +337,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(
        AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS,
        AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND,
    )
    @EnableFlags(StatusBarConnectedDisplays.FLAG_NAME, ShadeWindowGoesAround.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnSecondaryDisplay_statusBarConnectedDisplaysEnabled_shadeWindowGoesAroundEnabled_shadeReceivesEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -354,8 +349,8 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(AconfigFlags.FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    @DisableFlags(AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND)
    @EnableFlags(StatusBarConnectedDisplays.FLAG_NAME)
    @DisableFlags(ShadeWindowGoesAround.FLAG_NAME)
    fun handleTouchEventFromStatusBar_touchOnSecondaryDisplay_statusBarConnectedDisplaysEnabled_shadeWindowGoesAroundDisabled_shadeDoesNotReceiveEvent() {
        `when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
        `when`(shadeViewController.isViewEnabled).thenReturn(true)
@@ -441,7 +436,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND)
    @EnableFlags(ShadeWindowGoesAround.FLAG_NAME)
    fun onTouch_actionDown_propagatesToDisplayPolicy() {
        controller.onTouch(MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0))

@@ -449,7 +444,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND)
    @EnableFlags(ShadeWindowGoesAround.FLAG_NAME)
    fun onTouch_actionUp_notPropagatesToDisplayPolicy() {
        controller.onTouch(MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_UP, 0f, 0f, 0))

@@ -457,7 +452,7 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
    }

    @Test
    @DisableFlags(AconfigFlags.FLAG_SHADE_WINDOW_GOES_AROUND)
    @DisableFlags(ShadeWindowGoesAround.FLAG_NAME)
    fun onTouch_shadeWindowGoesAroundDisabled_notPropagatesToDisplayPolicy() {
        controller.onTouch(MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0))