Merge "Remove NEW_HEADERS flag" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7d1f6b2287
@@ -21,51 +21,105 @@
|
||||
android:id="@+id/qs_header_constraint"
|
||||
>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/privacy_container">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintEnd_toEndOf="@id/end_guide"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/clock">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/date"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/privacy_container"
|
||||
app:layout_constraintBottom_toBottomOf="@id/carrier_group"
|
||||
app:layout_constraintEnd_toStartOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
<Transform
|
||||
android:scaleX="2.57"
|
||||
android:scaleY="2.57"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/date">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/clock"
|
||||
app:layout_constraintEnd_toStartOf="@id/space"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
/>
|
||||
<Motion
|
||||
app:motionStagger="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/carrier_group">
|
||||
<CustomAttribute
|
||||
app:attributeName="alpha"
|
||||
app:customFloatValue="1"
|
||||
/>
|
||||
<Layout
|
||||
app:layout_constraintWidth_min="48dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintStart_toEndOf="@id/clock"
|
||||
app:layout_constraintTop_toBottomOf="@id/privacy_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintBottom_toTopOf="@id/batteryRemainingIcon"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
<PropertySet
|
||||
android:alpha="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/privacy_container">
|
||||
android:id="@+id/statusIcons">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toEndOf="@id/space"
|
||||
app:layout_constraintEnd_toStartOf="@id/batteryRemainingIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/date"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/batteryRemainingIcon">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintHeight_min="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintStart_toEndOf="@id/statusIcons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/date"
|
||||
app:layout_constraintBottom_toBottomOf="@id/date"
|
||||
/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
|
||||
<Constraint
|
||||
android:id="@id/space">
|
||||
<Layout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toEndOf="@id/date"
|
||||
app:layout_constraintEnd_toStartOf="@id/statusIcons"
|
||||
/>
|
||||
</Constraint>
|
||||
</ConstraintSet>
|
||||
@@ -1,125 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2021 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<ConstraintSet
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/qs_header_constraint"
|
||||
>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/privacy_container">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintEnd_toEndOf="@id/end_guide"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/clock">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/privacy_container"
|
||||
app:layout_constraintBottom_toBottomOf="@id/carrier_group"
|
||||
app:layout_constraintEnd_toStartOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
<Transform
|
||||
android:scaleX="2.57"
|
||||
android:scaleY="2.57"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/date">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/space"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/carrier_group"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/carrier_group">
|
||||
<Layout
|
||||
app:layout_constraintWidth_min="48dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/large_screen_shade_header_min_height"
|
||||
app:layout_constraintStart_toEndOf="@id/clock"
|
||||
app:layout_constraintTop_toBottomOf="@id/privacy_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintBottom_toTopOf="@id/batteryRemainingIcon"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
<PropertySet
|
||||
android:alpha="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/statusIcons">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toEndOf="@id/space"
|
||||
app:layout_constraintEnd_toStartOf="@id/batteryRemainingIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/date"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/batteryRemainingIcon">
|
||||
<Layout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintHeight_min="@dimen/new_qs_header_non_clickable_element_height"
|
||||
app:layout_constraintStart_toEndOf="@id/statusIcons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/date"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
</Constraint>
|
||||
|
||||
|
||||
<Constraint
|
||||
android:id="@id/space">
|
||||
<Layout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toEndOf="@id/date"
|
||||
app:layout_constraintEnd_toStartOf="@id/statusIcons"
|
||||
/>
|
||||
</Constraint>
|
||||
</ConstraintSet>
|
||||
@@ -181,9 +181,6 @@ object Flags {
|
||||
"qs_user_detail_shortcut"
|
||||
)
|
||||
|
||||
// TODO(b/254512747): Tracking Bug
|
||||
val NEW_HEADER = releasedFlag(505, "new_header")
|
||||
|
||||
// TODO(b/254512383): Tracking Bug
|
||||
@JvmField
|
||||
val FULL_SCREEN_USER_SWITCHER =
|
||||
|
||||
@@ -331,13 +331,8 @@ class LargeScreenShadeHeaderController @Inject constructor(
|
||||
// Use resources.getXml instead of passing the resource id due to bug b/205018300
|
||||
header.getConstraintSet(QQS_HEADER_CONSTRAINT)
|
||||
.load(context, resources.getXml(R.xml.qqs_header))
|
||||
val qsConstraints = if (featureFlags.isEnabled(Flags.NEW_HEADER)) {
|
||||
R.xml.qs_header_new
|
||||
} else {
|
||||
R.xml.qs_header
|
||||
}
|
||||
header.getConstraintSet(QS_HEADER_CONSTRAINT)
|
||||
.load(context, resources.getXml(qsConstraints))
|
||||
.load(context, resources.getXml(R.xml.qs_header))
|
||||
header.getConstraintSet(LARGE_SCREEN_HEADER_CONSTRAINT)
|
||||
.load(context, resources.getXml(R.xml.large_screen_shade_header))
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class CombinedShadeHeaderConstraintsTest : SysuiTestCase() {
|
||||
load(context, context.resources.getXml(R.xml.qqs_header))
|
||||
}
|
||||
qsConstraint = ConstraintSet().apply {
|
||||
load(context, context.resources.getXml(R.xml.qs_header_new))
|
||||
load(context, context.resources.getXml(R.xml.qs_header))
|
||||
}
|
||||
largeScreenConstraint = ConstraintSet().apply {
|
||||
load(context, context.resources.getXml(R.xml.large_screen_shade_header))
|
||||
|
||||
@@ -179,7 +179,6 @@ class LargeScreenShadeHeaderControllerCombinedTest : SysuiTestCase() {
|
||||
whenever(iconManagerFactory.create(any(), any())).thenReturn(iconManager)
|
||||
|
||||
whenever(featureFlags.isEnabled(Flags.COMBINED_QS_HEADERS)).thenReturn(true)
|
||||
whenever(featureFlags.isEnabled(Flags.NEW_HEADER)).thenReturn(true)
|
||||
|
||||
setUpDefaultInsets()
|
||||
setUpMotionLayout(view)
|
||||
@@ -212,7 +211,7 @@ class LargeScreenShadeHeaderControllerCombinedTest : SysuiTestCase() {
|
||||
assertThat(captor.value.getResId()).isEqualTo(R.xml.qqs_header)
|
||||
|
||||
verify(qsConstraints).load(eq(context), capture(captor))
|
||||
assertThat(captor.value.getResId()).isEqualTo(R.xml.qs_header_new)
|
||||
assertThat(captor.value.getResId()).isEqualTo(R.xml.qs_header)
|
||||
|
||||
verify(largeScreenConstraints).load(eq(context), capture(captor))
|
||||
assertThat(captor.value.getResId()).isEqualTo(R.xml.large_screen_shade_header)
|
||||
|
||||
Reference in New Issue
Block a user