Revert^2 "[SB][Notifs] status_bar_ron_chips flag -> status_bar_not..."
This reverts commit fd39d2a3b0992b16b99955f7612c69e59e0fb283.
Reason for revert: Metrics show the original CL was *not* cause for performance regression b/374191659
Bug: 374191659
Original CL description:
Removes "RON" from the flag name and instead makes the flag name more
generic.
Also updates all the "demo RON" code to be "demo notification" instead.
Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips
Test: all tests under statusbar package
Change-Id: I5b989106d2fcdaa522accf3d51459e8107766112
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 4e181e3..2278789 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -421,9 +421,9 @@
}
flag {
- name: "status_bar_ron_chips"
+ name: "status_bar_notification_chips"
namespace: "systemui"
- description: "Show rich ongoing notifications as chips in the status bar"
+ description: "Show promoted ongoing notifications as chips in the status bar"
bug: "361346412"
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelTest.kt
similarity index 74%
rename from packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelTest.kt
rename to packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelTest.kt
index 118dea6..69a7627 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelTest.kt
@@ -14,17 +14,17 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel
+package com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel
import android.content.packageManager
import android.graphics.drawable.BitmapDrawable
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import androidx.test.filters.SmallTest
-import com.android.systemui.Flags.FLAG_STATUS_BAR_RON_CHIPS
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.commandline.CommandRegistry
@@ -40,13 +40,13 @@
import org.mockito.kotlin.whenever
@SmallTest
-class DemoRonChipViewModelTest : SysuiTestCase() {
+class DemoNotifChipViewModelTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
private val commandRegistry = kosmos.commandRegistry
private val pw = PrintWriter(StringWriter())
- private val underTest = kosmos.demoRonChipViewModel
+ private val underTest = kosmos.demoNotifChipViewModel
@Before
fun setUp() {
@@ -56,61 +56,61 @@
}
@Test
- @DisableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @DisableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_flagOff_hidden() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
- addDemoRonChip()
+ addDemoNotifChip()
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
@Test
- @EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @EnableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_noPackage_hidden() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
- commandRegistry.onShellCommand(pw, arrayOf("demo-ron"))
+ commandRegistry.onShellCommand(pw, arrayOf("demo-notif"))
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
@Test
- @EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @EnableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_hasPackage_shown() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
- commandRegistry.onShellCommand(pw, arrayOf("demo-ron", "-p", "com.android.systemui"))
+ commandRegistry.onShellCommand(pw, arrayOf("demo-notif", "-p", "com.android.systemui"))
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
}
@Test
- @EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @EnableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_hasText_shownWithText() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
commandRegistry.onShellCommand(
pw,
- arrayOf("demo-ron", "-p", "com.android.systemui", "-t", "test")
+ arrayOf("demo-notif", "-p", "com.android.systemui", "-t", "test"),
)
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown.Text::class.java)
}
@Test
- @EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @EnableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_supportsColor() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
commandRegistry.onShellCommand(
pw,
- arrayOf("demo-ron", "-p", "com.android.systemui", "-c", "#434343")
+ arrayOf("demo-notif", "-p", "com.android.systemui", "-c", "#434343"),
)
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
@@ -119,28 +119,28 @@
}
@Test
- @EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+ @EnableFlags(StatusBarNotifChips.FLAG_NAME)
fun chip_hasHideArg_hidden() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
// First, show a chip
- addDemoRonChip()
+ addDemoNotifChip()
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
// Then, hide the chip
- commandRegistry.onShellCommand(pw, arrayOf("demo-ron", "--hide"))
+ commandRegistry.onShellCommand(pw, arrayOf("demo-notif", "--hide"))
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
- private fun addDemoRonChip() {
- Companion.addDemoRonChip(commandRegistry, pw)
+ private fun addDemoNotifChip() {
+ addDemoNotifChip(commandRegistry, pw)
}
companion object {
- fun addDemoRonChip(commandRegistry: CommandRegistry, pw: PrintWriter) {
- commandRegistry.onShellCommand(pw, arrayOf("demo-ron", "-p", "com.android.systemui"))
+ fun addDemoNotifChip(commandRegistry: CommandRegistry, pw: PrintWriter) {
+ commandRegistry.onShellCommand(pw, arrayOf("demo-notif", "-p", "com.android.systemui"))
}
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt
index 2872900..eb5d931 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt
@@ -19,12 +19,11 @@
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_RON_CHIPS
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.chips.ron.ui.viewmodel.notifChipsViewModel
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.notification.data.model.activeNotificationModel
import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore
@@ -42,7 +41,7 @@
@SmallTest
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
-@EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+@EnableFlags(StatusBarNotifChips.FLAG_NAME)
class NotifChipsViewModelTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
index 26ce7b9..e96def6 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
@@ -25,7 +25,6 @@
import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.systemui.Flags.FLAG_STATUS_BAR_RON_CHIPS
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.coroutines.collectLastValue
@@ -40,7 +39,8 @@
import com.android.systemui.screenrecord.data.repository.screenRecordRepository
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.demoRonChipViewModel
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.demoNotifChipViewModel
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
import com.android.systemui.statusbar.phone.SystemUIDialog
@@ -66,13 +66,11 @@
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
-/**
- * Tests for [OngoingActivityChipsViewModel] when the [FLAG_STATUS_BAR_RON_CHIPS] flag is disabled.
- */
+/** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is disabled. */
@SmallTest
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
-@DisableFlags(FLAG_STATUS_BAR_RON_CHIPS)
+@DisableFlags(StatusBarNotifChips.FLAG_NAME)
class OngoingActivityChipsViewModelTest : SysuiTestCase() {
private val kosmos = Kosmos().also { it.testCase = this }
private val testScope = kosmos.testScope
@@ -99,11 +97,11 @@
@Before
fun setUp() {
setUpPackageManagerForMediaProjection(kosmos)
- kosmos.demoRonChipViewModel.start()
+ kosmos.demoNotifChipViewModel.start()
val icon =
BitmapDrawable(
context.resources,
- Bitmap.createBitmap(/* width= */ 100, /* height= */ 100, Bitmap.Config.ARGB_8888)
+ Bitmap.createBitmap(/* width= */ 100, /* height= */ 100, Bitmap.Config.ARGB_8888),
)
whenever(kosmos.packageManager.getApplicationIcon(any<String>())).thenReturn(icon)
}
@@ -325,7 +323,7 @@
latest: OngoingActivityChipModel?,
chipView: View,
dialog: SystemUIDialog,
- kosmos: Kosmos
+ kosmos: Kosmos,
): DialogInterface.OnClickListener {
// Capture the action that would get invoked when the user clicks "Stop" on the dialog
lateinit var dialogStopAction: DialogInterface.OnClickListener
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithRonsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithNotifsViewModelTest.kt
similarity index 93%
rename from packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithRonsViewModelTest.kt
rename to packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithNotifsViewModelTest.kt
index c5b857f..b12d7c5 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithRonsViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithNotifsViewModelTest.kt
@@ -24,7 +24,6 @@
import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.systemui.Flags.FLAG_STATUS_BAR_RON_CHIPS
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
@@ -37,9 +36,10 @@
import com.android.systemui.statusbar.StatusBarIconView
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.DemoNotifChipViewModelTest.Companion.addDemoNotifChip
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.demoNotifChipViewModel
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.notification.ui.viewmodel.NotifChipsViewModelTest.Companion.assertIsNotifChip
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.DemoRonChipViewModelTest.Companion.addDemoRonChip
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.demoRonChipViewModel
import com.android.systemui.statusbar.chips.ui.model.MultipleOngoingActivityChipsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
@@ -73,14 +73,12 @@
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever
-/**
- * Tests for [OngoingActivityChipsViewModel] when the [FLAG_STATUS_BAR_RON_CHIPS] flag is enabled.
- */
+/** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is enabled. */
@SmallTest
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
-@EnableFlags(FLAG_STATUS_BAR_RON_CHIPS)
-class OngoingActivityChipsWithRonsViewModelTest : SysuiTestCase() {
+@EnableFlags(StatusBarNotifChips.FLAG_NAME)
+class OngoingActivityChipsWithNotifsViewModelTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
private val systemClock = kosmos.fakeSystemClock
@@ -110,7 +108,7 @@
@Before
fun setUp() {
setUpPackageManagerForMediaProjection(kosmos)
- kosmos.demoRonChipViewModel.start()
+ kosmos.demoNotifChipViewModel.start()
val icon =
BitmapDrawable(
context.resources,
@@ -119,7 +117,7 @@
whenever(kosmos.packageManager.getApplicationIcon(any<String>())).thenReturn(icon)
}
- // Even though the `primaryChip` flow isn't used when the RONs flag is on, still test that the
+ // Even though the `primaryChip` flow isn't used when the notifs flag is on, still test that the
// flow has the right behavior to verify that we don't break any existing functionality.
@Test
@@ -256,13 +254,13 @@
testScope.runTest {
screenRecordState.value = ScreenRecordModel.Recording
callRepo.setOngoingCallState(inCallModel(startTimeMs = 34))
- addDemoRonChip(commandRegistry, pw)
+ addDemoNotifChip(commandRegistry, pw)
val latest by collectLastValue(underTest.chips)
assertIsScreenRecordChip(latest!!.primary)
assertIsCallChip(latest!!.secondary)
- // Demo RON chip is dropped
+ // Demo notif chip is dropped
}
@Test
@@ -389,7 +387,7 @@
fun primaryChip_higherPriorityChipAdded_lowerPriorityChipReplaced() =
testScope.runTest {
// Start with just the lowest priority chip shown
- addDemoRonChip(commandRegistry, pw)
+ addDemoNotifChip(commandRegistry, pw)
// And everything else hidden
callRepo.setOngoingCallState(OngoingCallModel.NoCall)
mediaProjectionState.value = MediaProjectionState.NotProjecting
@@ -397,7 +395,7 @@
val latest by collectLastValue(underTest.primaryChip)
- assertIsDemoRonChip(latest)
+ assertIsDemoNotifChip(latest)
// WHEN the higher priority call chip is added
callRepo.setOngoingCallState(inCallModel(startTimeMs = 34))
@@ -431,7 +429,7 @@
mediaProjectionState.value =
MediaProjectionState.Projecting.EntireScreen(NORMAL_PACKAGE)
callRepo.setOngoingCallState(inCallModel(startTimeMs = 34))
- addDemoRonChip(commandRegistry, pw)
+ addDemoNotifChip(commandRegistry, pw)
val latest by collectLastValue(underTest.primaryChip)
@@ -453,15 +451,15 @@
// WHEN the higher priority call is removed
callRepo.setOngoingCallState(OngoingCallModel.NoCall)
- // THEN the lower priority demo RON is used
- assertIsDemoRonChip(latest)
+ // THEN the lower priority demo notif is used
+ assertIsDemoNotifChip(latest)
}
@Test
fun chips_movesChipsAroundAccordingToPriority() =
testScope.runTest {
// Start with just the lowest priority chip shown
- addDemoRonChip(commandRegistry, pw)
+ addDemoNotifChip(commandRegistry, pw)
// And everything else hidden
callRepo.setOngoingCallState(OngoingCallModel.NoCall)
mediaProjectionState.value = MediaProjectionState.NotProjecting
@@ -469,16 +467,16 @@
val latest by collectLastValue(underTest.chips)
- assertIsDemoRonChip(latest!!.primary)
+ assertIsDemoNotifChip(latest!!.primary)
assertThat(latest!!.secondary).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
// WHEN the higher priority call chip is added
callRepo.setOngoingCallState(inCallModel(startTimeMs = 34))
- // THEN the higher priority call chip is used as primary and demo ron is demoted to
+ // THEN the higher priority call chip is used as primary and demo notif is demoted to
// secondary
assertIsCallChip(latest!!.primary)
- assertIsDemoRonChip(latest!!.secondary)
+ assertIsDemoNotifChip(latest!!.secondary)
// WHEN the higher priority media projection chip is added
mediaProjectionState.value =
@@ -489,7 +487,7 @@
)
// THEN the higher priority media projection chip is used as primary and call is demoted
- // to secondary (and demo RON is dropped altogether)
+ // to secondary (and demo notif is dropped altogether)
assertIsShareToAppChip(latest!!.primary)
assertIsCallChip(latest!!.secondary)
@@ -503,15 +501,15 @@
screenRecordState.value = ScreenRecordModel.DoingNothing
callRepo.setOngoingCallState(OngoingCallModel.NoCall)
- // THEN media projection and demo RON remain
+ // THEN media projection and demo notif remain
assertIsShareToAppChip(latest!!.primary)
- assertIsDemoRonChip(latest!!.secondary)
+ assertIsDemoNotifChip(latest!!.secondary)
// WHEN media projection is dropped
mediaProjectionState.value = MediaProjectionState.NotProjecting
- // THEN demo RON is promoted to primary
- assertIsDemoRonChip(latest!!.primary)
+ // THEN demo notif is promoted to primary
+ assertIsDemoNotifChip(latest!!.primary)
assertThat(latest!!.secondary).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
@@ -624,7 +622,7 @@
assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
}
- private fun assertIsDemoRonChip(latest: OngoingActivityChipModel?) {
+ private fun assertIsDemoNotifChip(latest: OngoingActivityChipModel?) {
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
assertThat((latest as OngoingActivityChipModel.Shown).icon)
.isInstanceOf(OngoingActivityChipModel.ChipIcon.FullColorAppIcon::class.java)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt
index be733d4..8ce0dbf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt
@@ -20,7 +20,7 @@
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.LogBufferFactory
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.DemoRonChipViewModel
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.DemoNotifChipViewModel
import dagger.Binds
import dagger.Module
import dagger.Provides
@@ -31,8 +31,8 @@
abstract class StatusBarChipsModule {
@Binds
@IntoMap
- @ClassKey(DemoRonChipViewModel::class)
- abstract fun binds(impl: DemoRonChipViewModel): CoreStartable
+ @ClassKey(DemoNotifChipViewModel::class)
+ abstract fun binds(impl: DemoNotifChipViewModel): CoreStartable
companion object {
@Provides
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModel.kt
similarity index 82%
rename from packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModel.kt
rename to packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModel.kt
index cce9a16..5fa19dd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModel.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel
+package com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel
import android.content.pm.PackageManager
import android.content.pm.PackageManager.NameNotFoundException
@@ -22,7 +22,7 @@
import com.android.systemui.CoreStartable
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel
@@ -37,25 +37,25 @@
import kotlinx.coroutines.flow.asStateFlow
/**
- * A view model that will emit demo RON chips (rich ongoing notification chips) from [chip] based on
- * adb commands sent by the user.
+ * A view model that will emit demo promoted ongoing notification chips from [chip] based on adb
+ * commands sent by the user.
*
* Example adb commands:
*
* To show a chip with the SysUI icon and custom text and color:
* ```
- * adb shell cmd statusbar demo-ron -p com.android.systemui -t 10min -c "\\#434343"
+ * adb shell cmd statusbar demo-notif -p com.android.systemui -t 10min -c "\\#434343"
* ```
*
* To hide the chip:
* ```
- * adb shell cmd statusbar demo-ron --hide
+ * adb shell cmd statusbar demo-notif --hide
* ```
*
- * See [DemoRonCommand] for more information on the adb command spec.
+ * See [DemoNotifCommand] for more information on the adb command spec.
*/
@SysUISingleton
-class DemoRonChipViewModel
+class DemoNotifChipViewModel
@Inject
constructor(
private val commandRegistry: CommandRegistry,
@@ -63,19 +63,19 @@
private val systemClock: SystemClock,
) : OngoingActivityChipViewModel, CoreStartable {
override fun start() {
- commandRegistry.registerCommand("demo-ron") { DemoRonCommand() }
+ commandRegistry.registerCommand(DEMO_COMMAND_NAME) { DemoNotifCommand() }
}
private val _chip =
MutableStateFlow<OngoingActivityChipModel>(OngoingActivityChipModel.Hidden())
override val chip: StateFlow<OngoingActivityChipModel> = _chip.asStateFlow()
- private inner class DemoRonCommand : ParseableCommand("demo-ron") {
+ private inner class DemoNotifCommand : ParseableCommand(DEMO_COMMAND_NAME) {
private val packageName: String? by
param(
longName = "packageName",
shortName = "p",
- description = "The package name for the demo RON app",
+ description = "The package name for app \"posting\" the demo notification",
valueParser = Type.String,
)
@@ -99,15 +99,12 @@
)
private val hide by
- flag(
- longName = "hide",
- description = "Hides any existing demo RON chip",
- )
+ flag(longName = "hide", description = "Hides any existing demo notification chip")
override fun execute(pw: PrintWriter) {
- if (!StatusBarRonChips.isEnabled) {
+ if (!StatusBarNotifChips.isEnabled) {
pw.println(
- "Error: com.android.systemui.status_bar_ron_chips must be enabled " +
+ "Error: com.android.systemui.status_bar_notification_chips must be enabled " +
"before using this demo feature"
)
return
@@ -167,8 +164,12 @@
return null
}
return OngoingActivityChipModel.ChipIcon.FullColorAppIcon(
- Icon.Loaded(drawable = iconDrawable, contentDescription = null),
+ Icon.Loaded(drawable = iconDrawable, contentDescription = null)
)
}
}
+
+ companion object {
+ private const val DEMO_COMMAND_NAME = "demo-notif"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/shared/StatusBarRonChips.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/shared/StatusBarNotifChips.kt
similarity index 87%
rename from packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/shared/StatusBarRonChips.kt
rename to packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/shared/StatusBarNotifChips.kt
index 4ef1909..47ffbaf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ron/shared/StatusBarRonChips.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/shared/StatusBarNotifChips.kt
@@ -14,17 +14,17 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.chips.ron.shared
+package com.android.systemui.statusbar.chips.notification.shared
import com.android.systemui.Flags
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.RefactorFlagUtils
-/** Helper for reading or using the status bar RON chips flag state. */
+/** Helper for reading or using the status bar promoted notification chips flag state. */
@Suppress("NOTHING_TO_INLINE")
-object StatusBarRonChips {
+object StatusBarNotifChips {
/** The aconfig flag name */
- const val FLAG_NAME = Flags.FLAG_STATUS_BAR_RON_CHIPS
+ const val FLAG_NAME = Flags.FLAG_STATUS_BAR_NOTIFICATION_CHIPS
/** A token used for dependency declaration */
val token: FlagToken
@@ -33,7 +33,7 @@
/** Is the refactor enabled */
@JvmStatic
inline val isEnabled
- get() = Flags.statusBarRonChips()
+ get() = Flags.statusBarNotificationChips()
/**
* Called to ensure code is only run when the flag is enabled. This protects users from the
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt
index 2220caab..f4462a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt
@@ -28,7 +28,7 @@
import com.android.systemui.common.ui.binder.IconViewBinder
import com.android.systemui.res.R
import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
import com.android.systemui.statusbar.chips.ui.view.ChipChronometer
@@ -102,7 +102,7 @@
defaultIconView.tintView(iconTint)
}
is OngoingActivityChipModel.ChipIcon.FullColorAppIcon -> {
- StatusBarRonChips.assertInNewMode()
+ StatusBarNotifChips.assertInNewMode()
IconViewBinder.bind(icon.impl, defaultIconView)
defaultIconView.visibility = View.VISIBLE
defaultIconView.untintView()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
index 2366572..cf07af1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
@@ -20,7 +20,7 @@
import com.android.systemui.Flags
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
/** Model representing the display of an ongoing activity as a chip in the status bar. */
sealed class OngoingActivityChipModel {
@@ -91,10 +91,7 @@
override val onClickListener: View.OnClickListener?,
) : Shown(icon, colors, onClickListener) {
init {
- check(StatusBarRonChips.isEnabled) {
- "OngoingActivityChipModel.Shown.ShortTimeDelta created even though " +
- "Flags.statusBarRonChips is not enabled"
- }
+ StatusBarNotifChips.assertInNewMode()
}
override val logName = "Shown.ShortTimeDelta"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
index 954386e..ed32597 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
@@ -16,7 +16,6 @@
package com.android.systemui.statusbar.chips.ui.viewmodel
-import com.android.systemui.Flags
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.log.LogBuffer
@@ -24,9 +23,9 @@
import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModel
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.CastToOtherDeviceChipViewModel
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.DemoNotifChipViewModel
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.notification.ui.viewmodel.NotifChipsViewModel
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.DemoRonChipViewModel
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips
import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel
import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.ShareToAppChipViewModel
import com.android.systemui.statusbar.chips.ui.model.MultipleOngoingActivityChipsModel
@@ -57,7 +56,7 @@
castToOtherDeviceChipViewModel: CastToOtherDeviceChipViewModel,
callChipViewModel: CallChipViewModel,
notifChipsViewModel: NotifChipsViewModel,
- demoRonChipViewModel: DemoRonChipViewModel,
+ demoNotifChipViewModel: DemoNotifChipViewModel,
@StatusBarChipsLog private val logger: LogBuffer,
) {
private enum class ChipType {
@@ -66,8 +65,8 @@
CastToOtherDevice,
Call,
Notification,
- /** A demo of a RON chip (rich ongoing notification chip), used just for testing. */
- DemoRon,
+ /** A demo of a notification chip, used just for testing. */
+ DemoNotification,
}
/** Model that helps us internally track the various chip states from each of the types. */
@@ -89,7 +88,7 @@
val castToOtherDevice: OngoingActivityChipModel.Hidden,
val call: OngoingActivityChipModel.Hidden,
val notifs: OngoingActivityChipModel.Hidden,
- val demoRon: OngoingActivityChipModel.Hidden,
+ val demoNotif: OngoingActivityChipModel.Hidden,
) : InternalChipModel
}
@@ -99,7 +98,7 @@
val castToOtherDevice: OngoingActivityChipModel = OngoingActivityChipModel.Hidden(),
val call: OngoingActivityChipModel = OngoingActivityChipModel.Hidden(),
val notifs: List<OngoingActivityChipModel.Shown> = emptyList(),
- val demoRon: OngoingActivityChipModel = OngoingActivityChipModel.Hidden(),
+ val demoNotif: OngoingActivityChipModel = OngoingActivityChipModel.Hidden(),
)
/** Bundles all the incoming chips into one object to easily pass to various flows. */
@@ -110,8 +109,8 @@
castToOtherDeviceChipViewModel.chip,
callChipViewModel.chip,
notifChipsViewModel.chips,
- demoRonChipViewModel.chip,
- ) { screenRecord, shareToApp, castToOtherDevice, call, notifs, demoRon ->
+ demoNotifChipViewModel.chip,
+ ) { screenRecord, shareToApp, castToOtherDevice, call, notifs, demoNotif ->
logger.log(
TAG,
LogLevel.INFO,
@@ -129,9 +128,9 @@
str1 = call.logName
// TODO(b/364653005): Log other information for notification chips.
str2 = notifs.map { it.logName }.toString()
- str3 = demoRon.logName
+ str3 = demoNotif.logName
},
- { "... > Call=$str1 > Notifs=$str2 > DemoRon=$str3" },
+ { "... > Call=$str1 > Notifs=$str2 > DemoNotif=$str3" },
)
ChipBundle(
screenRecord = screenRecord,
@@ -139,7 +138,7 @@
castToOtherDevice = castToOtherDevice,
call = call,
notifs = notifs,
- demoRon = demoRon,
+ demoNotif = demoNotif,
)
}
// Some of the chips could have timers in them and we don't want the start time
@@ -198,9 +197,9 @@
* actually displaying the chip.
*/
val chips: StateFlow<MultipleOngoingActivityChipsModel> =
- if (!Flags.statusBarRonChips()) {
- // Multiple chips are only allowed with RONs. If the flag isn't on, use just the
- // primary chip.
+ if (!StatusBarNotifChips.isEnabled) {
+ // Multiple chips are only allowed with notification chips. If the flag isn't on, use
+ // just the primary chip.
primaryChip
.map {
MultipleOngoingActivityChipsModel(
@@ -282,11 +281,12 @@
remainingChips =
bundle.copy(notifs = bundle.notifs.subList(1, bundle.notifs.size)),
)
- bundle.demoRon is OngoingActivityChipModel.Shown -> {
- StatusBarRonChips.assertInNewMode()
+ bundle.demoNotif is OngoingActivityChipModel.Shown -> {
+ StatusBarNotifChips.assertInNewMode()
MostImportantChipResult(
- mostImportantChip = InternalChipModel.Shown(ChipType.DemoRon, bundle.demoRon),
- remainingChips = bundle.copy(demoRon = OngoingActivityChipModel.Hidden()),
+ mostImportantChip =
+ InternalChipModel.Shown(ChipType.DemoNotification, bundle.demoNotif),
+ remainingChips = bundle.copy(demoNotif = OngoingActivityChipModel.Hidden()),
)
}
else -> {
@@ -296,7 +296,7 @@
check(bundle.castToOtherDevice is OngoingActivityChipModel.Hidden)
check(bundle.call is OngoingActivityChipModel.Hidden)
check(bundle.notifs.isEmpty())
- check(bundle.demoRon is OngoingActivityChipModel.Hidden)
+ check(bundle.demoNotif is OngoingActivityChipModel.Hidden)
MostImportantChipResult(
mostImportantChip =
InternalChipModel.Hidden(
@@ -305,7 +305,7 @@
castToOtherDevice = bundle.castToOtherDevice,
call = bundle.call,
notifs = OngoingActivityChipModel.Hidden(),
- demoRon = bundle.demoRon,
+ demoNotif = bundle.demoNotif,
),
// All the chips are already hidden, so no need to filter anything out of the
// bundle.
@@ -334,7 +334,7 @@
ChipType.CastToOtherDevice -> new.castToOtherDevice
ChipType.Call -> new.call
ChipType.Notification -> new.notifs
- ChipType.DemoRon -> new.demoRon
+ ChipType.DemoNotification -> new.demoNotif
}
} else if (new is InternalChipModel.Shown) {
// If we have a chip to show, always show it.
@@ -356,7 +356,7 @@
castToOtherDevice = OngoingActivityChipModel.Hidden(),
call = OngoingActivityChipModel.Hidden(),
notifs = OngoingActivityChipModel.Hidden(),
- demoRon = OngoingActivityChipModel.Hidden(),
+ demoNotif = OngoingActivityChipModel.Hidden(),
)
private val DEFAULT_MULTIPLE_INTERNAL_HIDDEN_MODEL =
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/ActiveNotificationsInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/ActiveNotificationsInteractor.kt
index 5900fb0..697a6ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/ActiveNotificationsInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/ActiveNotificationsInteractor.kt
@@ -17,7 +17,7 @@
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.notification.collection.render.NotifStats
import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository
import com.android.systemui.statusbar.notification.shared.ActiveNotificationGroupModel
@@ -78,7 +78,7 @@
/** The notifications that are promoted and ongoing. Sorted by priority order. */
val promotedOngoingNotifications: Flow<List<ActiveNotificationModel>> =
- if (StatusBarRonChips.isEnabled) {
+ if (StatusBarNotifChips.isEnabled) {
// TODO(b/364653005): Filter all the notifications down to just the promoted ones.
// TODO(b/364653005): [ongoingCallNotification] should be incorporated into this flow
// instead of being separate.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
index f85785f..013141b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
@@ -56,7 +56,7 @@
import com.android.systemui.statusbar.OperatorNameView;
import com.android.systemui.statusbar.OperatorNameViewController;
import com.android.systemui.statusbar.StatusBarState;
-import com.android.systemui.statusbar.chips.ron.shared.StatusBarRonChips;
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips;
import com.android.systemui.statusbar.core.StatusBarConnectedDisplays;
import com.android.systemui.statusbar.core.StatusBarSimpleFragment;
import com.android.systemui.statusbar.disableflags.DisableFlagsLogger;
@@ -657,7 +657,7 @@
}
boolean showSecondaryOngoingActivityChip =
Flags.statusBarScreenSharingChips()
- && StatusBarRonChips.isEnabled()
+ && StatusBarNotifChips.isEnabled()
&& mHasSecondaryOngoingActivity;
return new StatusBarVisibilityModel(
@@ -699,7 +699,7 @@
boolean showSecondaryOngoingActivityChip =
// Secondary chips are only supported when RONs are enabled.
- StatusBarRonChips.isEnabled()
+ StatusBarNotifChips.isEnabled()
&& visibilityModel.getShowSecondaryOngoingActivityChip()
&& !disableNotifications;
if (showSecondaryOngoingActivityChip) {
@@ -832,7 +832,7 @@
}
private void showSecondaryOngoingActivityChip(boolean animate) {
- StatusBarRonChips.assertInNewMode();
+ StatusBarNotifChips.assertInNewMode();
StatusBarSimpleFragment.assertInLegacyMode();
animateShow(mSecondaryOngoingActivityChip, animate);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/HomeStatusBarViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/HomeStatusBarViewBinder.kt
index 473f956..11d7339 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/HomeStatusBarViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/HomeStatusBarViewBinder.kt
@@ -27,6 +27,7 @@
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.res.R
import com.android.systemui.scene.shared.flag.SceneContainerFlag
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.chips.ui.binder.OngoingActivityChipBinder
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.core.StatusBarSimpleFragment
@@ -84,7 +85,7 @@
}
}
- if (Flags.statusBarScreenSharingChips() && !Flags.statusBarRonChips()) {
+ if (Flags.statusBarScreenSharingChips() && !StatusBarNotifChips.isEnabled) {
val primaryChipView: View =
view.requireViewById(R.id.ongoing_activity_chip_primary)
launch {
@@ -120,7 +121,7 @@
}
}
- if (Flags.statusBarScreenSharingChips() && Flags.statusBarRonChips()) {
+ if (Flags.statusBarScreenSharingChips() && StatusBarNotifChips.isEnabled) {
val primaryChipView: View =
view.requireViewById(R.id.ongoing_activity_chip_primary)
val secondaryChipView: View =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
index e26a7ea..d01c1ca 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
@@ -16,7 +16,6 @@
import static android.view.Display.DEFAULT_DISPLAY;
-import static com.android.systemui.Flags.FLAG_STATUS_BAR_RON_CHIPS;
import static com.android.systemui.Flags.FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS;
import static com.android.systemui.Flags.FLAG_STATUS_BAR_SIMPLE_FRAGMENT;
import static com.android.systemui.shade.ShadeExpansionStateManagerKt.STATE_CLOSED;
@@ -61,6 +60,7 @@
import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.OperatorNameViewController;
+import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips;
import com.android.systemui.statusbar.disableflags.DisableFlagsLogger;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.icon.ui.viewbinder.NotificationIconContainerStatusBarViewBinder;
@@ -633,7 +633,7 @@
@Test
@EnableFlags({
FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS,
- FLAG_STATUS_BAR_RON_CHIPS,
+ StatusBarNotifChips.FLAG_NAME,
FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
public void hasPrimaryOngoingActivity_viewsUnchangedWhenSimpleFragmentFlagOn() {
resumeAndGetFragment();
@@ -660,8 +660,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void hasSecondaryOngoingActivity_butRonsFlagOff_secondaryChipHidden() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void hasSecondaryOngoingActivity_butNotifsFlagOff_secondaryChipHidden() {
resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
@@ -673,7 +673,7 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
public void hasSecondaryOngoingActivity_flagOn_secondaryChipShownAndNotificationIconsHidden() {
resumeAndGetFragment();
@@ -689,8 +689,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void hasOngoingActivityButNotificationIconsDisabled_chipHidden_ronsFlagOff() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void hasOngoingActivityButNotificationIconsDisabled_chipHidden_notifsFlagOff() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
@@ -705,9 +705,9 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
- public void hasOngoingActivitiesButNotificationIconsDisabled_chipsHidden_ronsFlagOn() {
+ public void hasOngoingActivitiesButNotificationIconsDisabled_chipsHidden_notifsFlagOn() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
@@ -724,8 +724,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void hasOngoingActivityButAlsoHun_chipHidden_ronsFlagOff() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void hasOngoingActivityButAlsoHun_chipHidden_notifsFlagOff() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
@@ -740,9 +740,9 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
- public void hasOngoingActivitiesButAlsoHun_chipsHidden_ronsFlagOn() {
+ public void hasOngoingActivitiesButAlsoHun_chipsHidden_notifsFlagOn() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
@@ -759,8 +759,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void primaryOngoingActivityEnded_chipHidden_ronsFlagOff() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void primaryOngoingActivityEnded_chipHidden_notifsFlagOff() {
resumeAndGetFragment();
// Ongoing activity started
@@ -781,9 +781,9 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
- public void primaryOngoingActivityEnded_chipHidden_ronsFlagOn() {
+ public void primaryOngoingActivityEnded_chipHidden_notifsFlagOn() {
resumeAndGetFragment();
// Ongoing activity started
@@ -804,7 +804,7 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
public void secondaryOngoingActivityEnded_chipHidden() {
resumeAndGetFragment();
@@ -828,8 +828,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void hasOngoingActivity_hidesNotifsWithoutAnimation_ronsFlagOff() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void hasOngoingActivity_hidesNotifsWithoutAnimation_notifsFlagOff() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
// Enable animations for testing so that we can verify we still aren't animating
fragment.enableAnimationsForTesting();
@@ -846,9 +846,9 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
- public void hasOngoingActivity_hidesNotifsWithoutAnimation_ronsFlagOn() {
+ public void hasOngoingActivity_hidesNotifsWithoutAnimation_notifsFlagOn() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
// Enable animations for testing so that we can verify we still aren't animating
fragment.enableAnimationsForTesting();
@@ -866,8 +866,8 @@
@Test
@EnableFlags(FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS)
- @DisableFlags({FLAG_STATUS_BAR_RON_CHIPS, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
- public void screenSharingChipsEnabled_ignoresOngoingCallController_ronsFlagOff() {
+ @DisableFlags({StatusBarNotifChips.FLAG_NAME, FLAG_STATUS_BAR_SIMPLE_FRAGMENT})
+ public void screenSharingChipsEnabled_ignoresOngoingCallController_notifsFlagOff() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
// WHEN there *is* an ongoing call via old callback
@@ -898,9 +898,9 @@
}
@Test
- @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, FLAG_STATUS_BAR_RON_CHIPS})
+ @EnableFlags({FLAG_STATUS_BAR_SCREEN_SHARING_CHIPS, StatusBarNotifChips.FLAG_NAME})
@DisableFlags(FLAG_STATUS_BAR_SIMPLE_FRAGMENT)
- public void screenSharingChipsEnabled_ignoresOngoingCallController_ronsFlagOn() {
+ public void screenSharingChipsEnabled_ignoresOngoingCallController_notifsFlagOn() {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
// WHEN there *is* an ongoing call via old callback
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelKosmos.kt
similarity index 85%
rename from packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelKosmos.kt
rename to packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelKosmos.kt
index c0d65a0..2316a2f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/demo/ui/viewmodel/DemoRonChipViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/demo/ui/viewmodel/DemoNotifChipViewModelKosmos.kt
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel
+package com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel
import android.content.packageManager
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.statusbar.commandline.commandRegistry
import com.android.systemui.util.time.fakeSystemClock
-val Kosmos.demoRonChipViewModel: DemoRonChipViewModel by
+val Kosmos.demoNotifChipViewModel: DemoNotifChipViewModel by
Kosmos.Fixture {
- DemoRonChipViewModel(
+ DemoNotifChipViewModel(
commandRegistry = commandRegistry,
packageManager = packageManager,
systemClock = fakeSystemClock,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/ui/viewmodel/NotifChipsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelKosmos.kt
similarity index 85%
rename from packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/ui/viewmodel/NotifChipsViewModelKosmos.kt
rename to packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelKosmos.kt
index 11d1cb7..af24c37 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ron/ui/viewmodel/NotifChipsViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelKosmos.kt
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.chips.ron.ui.viewmodel
+package com.android.systemui.statusbar.chips.notification.ui.viewmodel
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.statusbar.chips.notification.ui.viewmodel.NotifChipsViewModel
import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor
val Kosmos.notifChipsViewModel: NotifChipsViewModel by
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
index b2be0b2..0300bf4 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
@@ -20,8 +20,8 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.statusbar.chips.call.ui.viewmodel.callChipViewModel
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.castToOtherDeviceChipViewModel
-import com.android.systemui.statusbar.chips.ron.demo.ui.viewmodel.demoRonChipViewModel
-import com.android.systemui.statusbar.chips.ron.ui.viewmodel.notifChipsViewModel
+import com.android.systemui.statusbar.chips.notification.demo.ui.viewmodel.demoNotifChipViewModel
+import com.android.systemui.statusbar.chips.notification.ui.viewmodel.notifChipsViewModel
import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.screenRecordChipViewModel
import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.shareToAppChipViewModel
import com.android.systemui.statusbar.chips.statusBarChipsLogger
@@ -35,7 +35,7 @@
castToOtherDeviceChipViewModel = castToOtherDeviceChipViewModel,
callChipViewModel = callChipViewModel,
notifChipsViewModel = notifChipsViewModel,
- demoRonChipViewModel = demoRonChipViewModel,
+ demoNotifChipViewModel = demoNotifChipViewModel,
logger = statusBarChipsLogger,
)
}