Loading packages/SystemUI/aconfig/systemui.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -132,14 +132,6 @@ flag { } } flag { name: "notifications_footer_view_refactor" namespace: "systemui" description: "Enables the refactored version of the footer view in the notification shade " "(containing the \"Clear all\" button). Should not bring any behavior changes" bug: "293167744" } flag { name: "notifications_icon_container_refactor" namespace: "systemui" Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shade/QuickSettingsControllerImplTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ import androidx.test.filters.SmallTest; import com.android.systemui.plugins.qs.QS; import com.android.systemui.qs.flags.QSComposeFragment; import com.android.systemui.res.R; import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -365,7 +364,6 @@ public class QuickSettingsControllerImplTest extends QuickSettingsControllerImpl } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void updateExpansion_partiallyExpanded_fullscreenFalse() { // WHEN QS are only partially expanded mQsController.setExpanded(true); Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/render/RenderStageManagerTest.kt +4 −5 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ import com.android.systemui.statusbar.notification.collection.ShadeListBuilder import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderEntryListener import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderGroupListener import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderListListener import com.android.systemui.util.mockito.withArgCaptor import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.kotlin.any import org.mockito.kotlin.argumentCaptor import org.mockito.kotlin.inOrder import org.mockito.kotlin.mock import org.mockito.kotlin.never Loading @@ -59,10 +59,9 @@ class RenderStageManagerTest : SysuiTestCase() { fun setUp() { renderStageManager = RenderStageManager() renderStageManager.attach(shadeListBuilder) val captor = argumentCaptor<ShadeListBuilder.OnRenderListListener>() verify(shadeListBuilder).setOnRenderListListener(captor.capture()) onRenderListListener = captor.lastValue onRenderListListener = withArgCaptor { verify(shadeListBuilder).setOnRenderListListener(capture()) } } private fun setUpRenderer() { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/emptyshade/ui/viewmodel/EmptyShadeViewModelTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import com.android.systemui.kosmos.testScope import com.android.systemui.shared.settings.data.repository.fakeSecureSettingsRepository import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.emptyshade.shared.ModesEmptyShadeFix import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor import com.android.systemui.statusbar.policy.data.repository.zenModeRepository import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat Loading @@ -48,7 +47,6 @@ import platform.test.runner.parameterized.Parameters @OptIn(ExperimentalCoroutinesApi::class) @RunWith(ParameterizedAndroidJunit4::class) @SmallTest @EnableFlags(FooterViewRefactor.FLAG_NAME) class EmptyShadeViewModelTest(flags: FlagsParameterization) : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterViewTest.java +1 −84 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.statusbar.notification.footer.ui.view; import static com.android.systemui.log.LogAssertKt.assertLogsWtf; import static com.google.common.truth.Truth.assertThat; import static junit.framework.Assert.assertFalse; Loading @@ -34,7 +32,6 @@ import static org.mockito.Mockito.verify; import android.content.Context; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.FlagsParameterization; import android.view.LayoutInflater; import android.view.View; Loading @@ -44,7 +41,6 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.res.R; import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor; import com.android.systemui.statusbar.notification.footer.shared.NotifRedesignFooter; import org.junit.Before; Loading @@ -62,8 +58,7 @@ public class FooterViewTest extends SysuiTestCase { @Parameters(name = "{0}") public static List<FlagsParameterization> getFlags() { return FlagsParameterization.progressionOf(FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME); return FlagsParameterization.allCombinationsOf(NotifRedesignFooter.FLAG_NAME); } public FooterViewTest(FlagsParameterization flags) { Loading Loading @@ -105,24 +100,6 @@ public class FooterViewTest extends SysuiTestCase { assertTrue(mView.findViewById(R.id.manage_text).hasOnClickListeners()); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void setHistoryShown() { mView.showHistory(true); assertTrue(mView.isHistoryShown()); assertTrue(((TextView) mView.findViewById(R.id.manage_text)) .getText().toString().contains("History")); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void setHistoryNotShown() { mView.showHistory(false); assertFalse(mView.isHistoryShown()); assertTrue(((TextView) mView.findViewById(R.id.manage_text)) .getText().toString().contains("Manage")); } @Test public void testPerformVisibilityAnimation() { mView.setVisible(false /* visible */, false /* animate */); Loading @@ -140,7 +117,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) @DisableFlags(NotifRedesignFooter.FLAG_NAME) public void testSetManageOrHistoryButtonText_resourceOnlyFetchedOnce() { int resId = R.string.manage_notifications_history_text; Loading @@ -160,16 +136,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetManageOrHistoryButtonText_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.manage_notifications_history_text; assertLogsWtf(() -> mView.setManageOrHistoryButtonText(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) @DisableFlags(NotifRedesignFooter.FLAG_NAME) public void testSetManageOrHistoryButtonDescription_resourceOnlyFetchedOnce() { int resId = R.string.manage_notifications_history_text; Loading @@ -189,16 +155,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetManageOrHistoryButtonDescription_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.accessibility_clear_all; assertLogsWtf(() -> mView.setManageOrHistoryButtonDescription(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetClearAllButtonText_resourceOnlyFetchedOnce() { int resId = R.string.clear_all_notifications_text; mView.setClearAllButtonText(resId); Loading @@ -217,16 +173,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetClearAllButtonText_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.clear_all_notifications_text; assertLogsWtf(() -> mView.setClearAllButtonText(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetClearAllButtonDescription_resourceOnlyFetchedOnce() { int resId = R.string.accessibility_clear_all; mView.setClearAllButtonDescription(resId); Loading @@ -245,16 +191,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetClearAllButtonDescription_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.accessibility_clear_all; assertLogsWtf(() -> mView.setClearAllButtonDescription(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetMessageString_resourceOnlyFetchedOnce() { int resId = R.string.unlock_to_see_notif_text; mView.setMessageString(resId); Loading @@ -273,16 +209,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetMessageString_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.unlock_to_see_notif_text; assertLogsWtf(() -> mView.setMessageString(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetMessageIcon_resourceOnlyFetchedOnce() { int resId = R.drawable.ic_friction_lock_closed; mView.setMessageIcon(resId); Loading @@ -297,15 +223,6 @@ public class FooterViewTest extends SysuiTestCase { verify(mSpyContext, never()).getDrawable(anyInt()); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetMessageIcon_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.drawable.ic_friction_lock_closed; assertLogsWtf(() -> mView.setMessageIcon(resId)); verify(mSpyContext, never()).getDrawable(anyInt()); } @Test public void testSetFooterLabelVisible() { mView.setFooterLabelVisible(true); Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -132,14 +132,6 @@ flag { } } flag { name: "notifications_footer_view_refactor" namespace: "systemui" description: "Enables the refactored version of the footer view in the notification shade " "(containing the \"Clear all\" button). Should not bring any behavior changes" bug: "293167744" } flag { name: "notifications_icon_container_refactor" namespace: "systemui" Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shade/QuickSettingsControllerImplTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ import androidx.test.filters.SmallTest; import com.android.systemui.plugins.qs.QS; import com.android.systemui.qs.flags.QSComposeFragment; import com.android.systemui.res.R; import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -365,7 +364,6 @@ public class QuickSettingsControllerImplTest extends QuickSettingsControllerImpl } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void updateExpansion_partiallyExpanded_fullscreenFalse() { // WHEN QS are only partially expanded mQsController.setExpanded(true); Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/render/RenderStageManagerTest.kt +4 −5 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ import com.android.systemui.statusbar.notification.collection.ShadeListBuilder import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderEntryListener import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderGroupListener import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderListListener import com.android.systemui.util.mockito.withArgCaptor import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.kotlin.any import org.mockito.kotlin.argumentCaptor import org.mockito.kotlin.inOrder import org.mockito.kotlin.mock import org.mockito.kotlin.never Loading @@ -59,10 +59,9 @@ class RenderStageManagerTest : SysuiTestCase() { fun setUp() { renderStageManager = RenderStageManager() renderStageManager.attach(shadeListBuilder) val captor = argumentCaptor<ShadeListBuilder.OnRenderListListener>() verify(shadeListBuilder).setOnRenderListListener(captor.capture()) onRenderListListener = captor.lastValue onRenderListListener = withArgCaptor { verify(shadeListBuilder).setOnRenderListListener(capture()) } } private fun setUpRenderer() { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/emptyshade/ui/viewmodel/EmptyShadeViewModelTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import com.android.systemui.kosmos.testScope import com.android.systemui.shared.settings.data.repository.fakeSecureSettingsRepository import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.emptyshade.shared.ModesEmptyShadeFix import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor import com.android.systemui.statusbar.policy.data.repository.zenModeRepository import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat Loading @@ -48,7 +47,6 @@ import platform.test.runner.parameterized.Parameters @OptIn(ExperimentalCoroutinesApi::class) @RunWith(ParameterizedAndroidJunit4::class) @SmallTest @EnableFlags(FooterViewRefactor.FLAG_NAME) class EmptyShadeViewModelTest(flags: FlagsParameterization) : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterViewTest.java +1 −84 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.statusbar.notification.footer.ui.view; import static com.android.systemui.log.LogAssertKt.assertLogsWtf; import static com.google.common.truth.Truth.assertThat; import static junit.framework.Assert.assertFalse; Loading @@ -34,7 +32,6 @@ import static org.mockito.Mockito.verify; import android.content.Context; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.FlagsParameterization; import android.view.LayoutInflater; import android.view.View; Loading @@ -44,7 +41,6 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.res.R; import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor; import com.android.systemui.statusbar.notification.footer.shared.NotifRedesignFooter; import org.junit.Before; Loading @@ -62,8 +58,7 @@ public class FooterViewTest extends SysuiTestCase { @Parameters(name = "{0}") public static List<FlagsParameterization> getFlags() { return FlagsParameterization.progressionOf(FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME); return FlagsParameterization.allCombinationsOf(NotifRedesignFooter.FLAG_NAME); } public FooterViewTest(FlagsParameterization flags) { Loading Loading @@ -105,24 +100,6 @@ public class FooterViewTest extends SysuiTestCase { assertTrue(mView.findViewById(R.id.manage_text).hasOnClickListeners()); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void setHistoryShown() { mView.showHistory(true); assertTrue(mView.isHistoryShown()); assertTrue(((TextView) mView.findViewById(R.id.manage_text)) .getText().toString().contains("History")); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void setHistoryNotShown() { mView.showHistory(false); assertFalse(mView.isHistoryShown()); assertTrue(((TextView) mView.findViewById(R.id.manage_text)) .getText().toString().contains("Manage")); } @Test public void testPerformVisibilityAnimation() { mView.setVisible(false /* visible */, false /* animate */); Loading @@ -140,7 +117,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) @DisableFlags(NotifRedesignFooter.FLAG_NAME) public void testSetManageOrHistoryButtonText_resourceOnlyFetchedOnce() { int resId = R.string.manage_notifications_history_text; Loading @@ -160,16 +136,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetManageOrHistoryButtonText_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.manage_notifications_history_text; assertLogsWtf(() -> mView.setManageOrHistoryButtonText(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) @DisableFlags(NotifRedesignFooter.FLAG_NAME) public void testSetManageOrHistoryButtonDescription_resourceOnlyFetchedOnce() { int resId = R.string.manage_notifications_history_text; Loading @@ -189,16 +155,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetManageOrHistoryButtonDescription_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.accessibility_clear_all; assertLogsWtf(() -> mView.setManageOrHistoryButtonDescription(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetClearAllButtonText_resourceOnlyFetchedOnce() { int resId = R.string.clear_all_notifications_text; mView.setClearAllButtonText(resId); Loading @@ -217,16 +173,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetClearAllButtonText_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.clear_all_notifications_text; assertLogsWtf(() -> mView.setClearAllButtonText(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetClearAllButtonDescription_resourceOnlyFetchedOnce() { int resId = R.string.accessibility_clear_all; mView.setClearAllButtonDescription(resId); Loading @@ -245,16 +191,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetClearAllButtonDescription_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.accessibility_clear_all; assertLogsWtf(() -> mView.setClearAllButtonDescription(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetMessageString_resourceOnlyFetchedOnce() { int resId = R.string.unlock_to_see_notif_text; mView.setMessageString(resId); Loading @@ -273,16 +209,6 @@ public class FooterViewTest extends SysuiTestCase { } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetMessageString_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.string.unlock_to_see_notif_text; assertLogsWtf(() -> mView.setMessageString(resId)); verify(mSpyContext, never()).getString(anyInt()); } @Test @EnableFlags(FooterViewRefactor.FLAG_NAME) public void testSetMessageIcon_resourceOnlyFetchedOnce() { int resId = R.drawable.ic_friction_lock_closed; mView.setMessageIcon(resId); Loading @@ -297,15 +223,6 @@ public class FooterViewTest extends SysuiTestCase { verify(mSpyContext, never()).getDrawable(anyInt()); } @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) public void testSetMessageIcon_expectsFlagEnabled() { clearInvocations(mSpyContext); int resId = R.drawable.ic_friction_lock_closed; assertLogsWtf(() -> mView.setMessageIcon(resId)); verify(mSpyContext, never()).getDrawable(anyInt()); } @Test public void testSetFooterLabelVisible() { mView.setFooterLabelVisible(true); Loading