Merge "Hide security footer container (QSBH) in portrait" into sc-qpr1-dev am: fc5c95cbc4 am: 551138d40e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727590 Change-Id: I2fe306b8a0820e42d47667040fa7d48be16e8fe7
This commit is contained in:
@@ -49,6 +49,11 @@
|
|||||||
/>
|
/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<!-- We want this to be centered (to align with notches). In order to do that, the following
|
||||||
|
has to hold (in portrait):
|
||||||
|
* date_container and privacy_container must have the same width and weight
|
||||||
|
* header_text_container must be gone
|
||||||
|
-->
|
||||||
<android.widget.Space
|
<android.widget.Space
|
||||||
android:id="@+id/space"
|
android:id="@+id/space"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -75,7 +80,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical|end" >
|
android:gravity="center_vertical|end" >
|
||||||
|
|
||||||
<include layout="@layout/ongoing_privacy_chip" />
|
<include layout="@layout/ongoing_privacy_chip" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -140,6 +140,10 @@ public class QuickStatusBarHeader extends FrameLayout {
|
|||||||
mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon);
|
mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon);
|
||||||
|
|
||||||
updateResources();
|
updateResources();
|
||||||
|
Configuration config = mContext.getResources().getConfiguration();
|
||||||
|
setDatePrivacyContainersWidth(config.orientation == Configuration.ORIENTATION_LANDSCAPE);
|
||||||
|
setSecurityHeaderContainerVisibility(
|
||||||
|
config.orientation == Configuration.ORIENTATION_LANDSCAPE);
|
||||||
|
|
||||||
// QS will always show the estimate, and BatteryMeterView handles the case where
|
// QS will always show the estimate, and BatteryMeterView handles the case where
|
||||||
// it's unavailable or charging
|
// it's unavailable or charging
|
||||||
@@ -189,6 +193,8 @@ public class QuickStatusBarHeader extends FrameLayout {
|
|||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
updateResources();
|
updateResources();
|
||||||
setDatePrivacyContainersWidth(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
|
setDatePrivacyContainersWidth(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
|
||||||
|
setSecurityHeaderContainerVisibility(
|
||||||
|
newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -209,6 +215,10 @@ public class QuickStatusBarHeader extends FrameLayout {
|
|||||||
mPrivacyContainer.setLayoutParams(lp);
|
mPrivacyContainer.setLayoutParams(lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setSecurityHeaderContainerVisibility(boolean landscape) {
|
||||||
|
mSecurityHeaderView.setVisibility(landscape ? VISIBLE : GONE);
|
||||||
|
}
|
||||||
|
|
||||||
private void updateBatteryMode() {
|
private void updateBatteryMode() {
|
||||||
if (mConfigShowBatteryEstimate && !mHasCenterCutout) {
|
if (mConfigShowBatteryEstimate && !mHasCenterCutout) {
|
||||||
mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE);
|
mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE);
|
||||||
|
|||||||
Reference in New Issue
Block a user