Merge changes I9025a0a3,I48a1d380 into udc-qpr-dev am: 77bfa87487
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24240249
Change-Id: I64ffe63e82238bd968e6fca37ae06cd97a06d20c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index dc38ec0..1b9be96 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -735,4 +735,12 @@
// TODO(b/290213663): Tracking Bug
@JvmField
val ONE_WAY_HAPTICS_API_MIGRATION = unreleasedFlag(3100, "oneway_haptics_api_migration")
+
+ /** 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/people/PeopleSpaceActivity.java b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java
index 7f0f894..d1d3e3d 100644
--- a/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java
@@ -28,6 +28,8 @@
import androidx.lifecycle.ViewModelProvider;
import com.android.systemui.compose.ComposeFacade;
+import com.android.systemui.flags.FeatureFlags;
+import com.android.systemui.flags.Flags;
import com.android.systemui.people.ui.view.PeopleViewBinder;
import com.android.systemui.people.ui.viewmodel.PeopleViewModel;
@@ -43,11 +45,14 @@
private static final boolean DEBUG = PeopleSpaceUtils.DEBUG;
private final PeopleViewModel.Factory mViewModelFactory;
+ private final FeatureFlags mFeatureFlags;
@Inject
- public PeopleSpaceActivity(PeopleViewModel.Factory viewModelFactory) {
+ public PeopleSpaceActivity(PeopleViewModel.Factory viewModelFactory,
+ FeatureFlags featureFlags) {
super();
mViewModelFactory = viewModelFactory;
+ mFeatureFlags = featureFlags;
}
@Override
@@ -67,7 +72,8 @@
return null;
};
- if (ComposeFacade.INSTANCE.isComposeAvailable()) {
+ if (mFeatureFlags.isEnabled(Flags.COMPOSE_PEOPLE_SPACE)
+ && ComposeFacade.INSTANCE.isComposeAvailable()) {
Log.d(TAG, "Using the Compose implementation of the PeopleSpaceActivity");
ComposeFacade.INSTANCE.setPeopleSpaceActivityContent(this, viewModel, onResult);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index 8d9475d..ddb395b 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.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 @@
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);