From 28d6944b4b5f5e69c5aaae382ee6a1e5da14bfe0 Mon Sep 17 00:00:00 2001 From: Jordan Demeulenaere Date: Fri, 28 Jul 2023 13:06:35 +0200 Subject: [PATCH] Add the COMPOSE_QS_FOOTER_ACTIONS flag Bug: 293569320 Test: Manual Change-Id: I9025a0a345572811161d8834643eb70f7cfbd172 --- packages/SystemUI/src/com/android/systemui/flags/Flags.kt | 4 ++++ packages/SystemUI/src/com/android/systemui/qs/QSFragment.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index 0f92b9ea36aad..9474c958637b2 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -738,4 +738,8 @@ object Flags { /** Enable the Compose implementation of the PeopleSpaceActivity. */ @JvmField val COMPOSE_PEOPLE_SPACE = unreleasedFlag(293570761, "compose_people_space") + + /** Enable the Compose implementation of the Quick Settings footer actions. */ + @JvmField + val COMPOSE_QS_FOOTER_ACTIONS = unreleasedFlag(293569320, "compose_qs_footer_actions") } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java index 8d9475d9a53e8..ddb395b6b5987 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java @@ -52,6 +52,7 @@ import com.android.systemui.animation.ShadeInterpolation; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlags; +import com.android.systemui.flags.Flags; import com.android.systemui.media.controls.ui.MediaHost; import com.android.systemui.plugins.qs.QS; import com.android.systemui.plugins.qs.QSContainerController; @@ -285,7 +286,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca private void bindFooterActionsView(View root) { LinearLayout footerActionsView = root.findViewById(R.id.qs_footer_actions); - if (!ComposeFacade.INSTANCE.isComposeAvailable()) { + if (!mFeatureFlags.isEnabled(Flags.COMPOSE_QS_FOOTER_ACTIONS) + || !ComposeFacade.INSTANCE.isComposeAvailable()) { Log.d(TAG, "Binding the View implementation of the QS footer actions"); mFooterActionsViewBinder.bind(footerActionsView, mQSFooterActionsViewModel, mListeningAndVisibilityLifecycleOwner);