diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 1f10e5dfeed83..405863dc9d92c 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -101,4 +101,16 @@
app:layout_constraintBottom_toBottomOf="parent"
/>
+
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/res/xml/qqs_header.xml b/packages/SystemUI/res/xml/qqs_header.xml
index 3d7b549fc54b8..c5b4c5d776b9a 100644
--- a/packages/SystemUI/res/xml/qqs_header.xml
+++ b/packages/SystemUI/res/xml/qqs_header.xml
@@ -48,6 +48,14 @@
/>
+
+
+
+
+
+
-
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/res/xml/qs_header.xml b/packages/SystemUI/res/xml/qs_header.xml
index 6a0ab866966ce..8248fcdb50fb9 100644
--- a/packages/SystemUI/res/xml/qs_header.xml
+++ b/packages/SystemUI/res/xml/qs_header.xml
@@ -58,5 +58,14 @@
/>
-
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/res/xml/split_header.xml b/packages/SystemUI/res/xml/split_header.xml
index 44d42a05cd46e..03401b3d51d1f 100644
--- a/packages/SystemUI/res/xml/split_header.xml
+++ b/packages/SystemUI/res/xml/split_header.xml
@@ -53,5 +53,29 @@
/>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SplitShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SplitShadeHeaderController.kt
index 8cf7288c9cd5e..3f479731d4c73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SplitShadeHeaderController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SplitShadeHeaderController.kt
@@ -19,12 +19,14 @@ package com.android.systemui.statusbar.phone
import android.view.View
import androidx.constraintlayout.motion.widget.MotionLayout
import com.android.settingslib.Utils
+import com.android.systemui.Dumpable
import com.android.systemui.R
import com.android.systemui.animation.ShadeInterpolation
import com.android.systemui.battery.BatteryMeterView
import com.android.systemui.battery.BatteryMeterViewController
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
+import com.android.systemui.qs.ChipVisibilityListener
import com.android.systemui.qs.HeaderPrivacyIconsController
import com.android.systemui.qs.carrier.QSCarrierGroupController
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent.StatusBarScope
@@ -97,6 +99,18 @@ class SplitShadeHeaderController @Inject constructor(
}
}
+ private val chipVisibilityListener: ChipVisibilityListener = object : ChipVisibilityListener {
+ override fun onChipVisibilityRefreshed(visible: Boolean) {
+ if (statusBar is MotionLayout) {
+ val state = statusBar.getConstraintSet(R.id.qqs_header_constraint).apply {
+ setAlpha(R.id.statusIcons, if (visible) 0f else 1f)
+ setAlpha(R.id.batteryRemainingIcon, if (visible) 0f else 1f)
+ }
+ statusBar.updateState(R.id.qqs_header_constraint, state)
+ }
+ }
+ }
+
init {
if (statusBar is MotionLayout) {
val context = statusBar.context
@@ -107,6 +121,7 @@ class SplitShadeHeaderController @Inject constructor(
.load(context, resources.getXml(R.xml.qs_header))
statusBar.getConstraintSet(R.id.split_header_constraint)
.load(context, resources.getXml(R.xml.split_header))
+ privacyIconsController.chipVisibilityListener = chipVisibilityListener
}
}
@@ -149,7 +164,7 @@ class SplitShadeHeaderController @Inject constructor(
}
private fun onSplitShadeModeChanged() {
- if (splitShadeMode) {
+ if (splitShadeMode || combinedHeaders) {
privacyIconsController.onParentVisible()
} else {
privacyIconsController.onParentInvisible()