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

Commit 48e22c5e authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Android (Google) Code Review
Browse files

Merge "[SB] Remove flag status_bar_show_audio_only_projection_chip" into main

parents eaf01763 149ae3b8
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -414,17 +414,6 @@ flag {
    bug: "383172066"
}

flag {
    name: "status_bar_show_audio_only_projection_chip"
    namespace: "systemui"
    description: "Show chip on the left side of the status bar when a user is only sharing *audio* "
        "during a media projection"
    bug: "373308507"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "status_bar_chips_modernization"
    namespace: "systemui"
+1 −15
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.view.ContentRecordingSession
import android.view.Display
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.Flags.FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -82,19 +81,7 @@ class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
        }

    @Test
    @DisableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun mediaProjectionState_onStart_flagOff_emitsNotProjecting() =
        testScope.runTest {
            val state by collectLastValue(repo.mediaProjectionState)

            fakeMediaProjectionManager.dispatchOnStart()

            assertThat(state).isEqualTo(MediaProjectionState.NotProjecting)
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun mediaProjectionState_onStart_flagOn_emitsProjectingNoScreen() =
    fun mediaProjectionState_onStart_emitsProjectingNoScreen() =
        testScope.runTest {
            val state by collectLastValue(repo.mediaProjectionState)

@@ -104,7 +91,6 @@ class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun mediaProjectionState_noScreen_hasHostPackage() =
        testScope.runTest {
            val state by collectLastValue(repo.mediaProjectionState)
+0 −4
Original line number Diff line number Diff line
@@ -17,12 +17,10 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel

import android.content.DialogInterface
import android.platform.test.annotations.EnableFlags
import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.jank.Cuj
import com.android.systemui.Flags.FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP
import com.android.systemui.SysuiTestCase
import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.Expandable
@@ -149,7 +147,6 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun chip_projectionIsAudioOnly_otherDevicePackage_isShownAsIconOnly() =
        testScope.runTest {
            val latest by collectLastValue(underTest.chip)
@@ -358,7 +355,6 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun chip_projectionIsNoScreenState_normalPackage_isHidden() =
        testScope.runTest {
            val latest by collectLastValue(underTest.chip)
+0 −4
Original line number Diff line number Diff line
@@ -21,10 +21,8 @@ import android.content.Intent
import android.content.packageManager
import android.content.pm.PackageManager
import android.content.pm.ResolveInfo
import android.platform.test.annotations.EnableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.Flags.FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.Kosmos
@@ -93,7 +91,6 @@ class MediaProjectionChipInteractorTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun projection_noScreenState_otherDevicesPackage_isCastToOtherAndAudio() =
        testScope.runTest {
            val latest by collectLastValue(underTest.projection)
@@ -143,7 +140,6 @@ class MediaProjectionChipInteractorTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun projection_noScreenState_normalPackage_isShareToAppAndAudio() =
        testScope.runTest {
            val latest by collectLastValue(underTest.projection)
+1 −9
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.jank.Cuj
import com.android.systemui.Flags.FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP
import com.android.systemui.SysuiTestCase
import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.Expandable
@@ -185,10 +184,7 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(
        com.android.media.projection.flags.Flags.FLAG_SHOW_STOP_DIALOG_POST_CALL_END,
        FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP,
    )
    @EnableFlags(com.android.media.projection.flags.Flags.FLAG_SHOW_STOP_DIALOG_POST_CALL_END)
    fun stopDialog_projectingAudio_flagEnabled_eventEmitted_showsGenericStopDialog() =
        kosmos.runTest {
            val latest by collectLastValue(underTest.stopDialogToShow)
@@ -334,7 +330,6 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun chip_noScreenState_otherDevicesPackage_isHidden() =
        testScope.runTest {
            val latest by collectLastValue(underTest.chip)
@@ -375,7 +370,6 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    fun chip_noScreenState_normalPackage_isShownAsIconOnly() =
        testScope.runTest {
            val latest by collectLastValue(underTest.chip)
@@ -525,7 +519,6 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    @DisableChipsModernization
    fun chip_noScreen_clickListenerShowsGenericShareDialog() =
        testScope.runTest {
@@ -657,7 +650,6 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
        }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_SHOW_AUDIO_ONLY_PROJECTION_CHIP)
    @EnableChipsModernization
    fun chip_noScreen_clickBehaviorShowsGenericShareDialog() =
        testScope.runTest {
Loading