Skip to content
Snippets Groups Projects
Commit fc5c95cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Hide security footer container (QSBH) in portrait" into sc-qpr1-dev

parents 8daf4242 001bd612
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,11 @@
/>
</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:id="@+id/space"
android:layout_width="0dp"
......@@ -75,7 +80,7 @@
android:layout_weight="1"
android:gravity="center_vertical|end" >
<include layout="@layout/ongoing_privacy_chip" />
<include layout="@layout/ongoing_privacy_chip" />
</FrameLayout>
</LinearLayout>
......@@ -140,6 +140,10 @@ public class QuickStatusBarHeader extends FrameLayout {
mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon);
updateResources();
Configuration config = mContext.getResources().getConfiguration();
setDatePrivacyContainersWidth(config.orientation == Configuration.ORIENTATION_LANDSCAPE);
setSecurityHeaderContainerVisibility(
config.orientation == Configuration.ORIENTATION_LANDSCAPE);
// Don't need to worry about tuner settings for this icon
mBatteryRemainingIcon.setIgnoreTunerUpdates(true);
......@@ -191,6 +195,8 @@ public class QuickStatusBarHeader extends FrameLayout {
super.onConfigurationChanged(newConfig);
updateResources();
setDatePrivacyContainersWidth(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
setSecurityHeaderContainerVisibility(
newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
}
@Override
......@@ -211,6 +217,10 @@ public class QuickStatusBarHeader extends FrameLayout {
mPrivacyContainer.setLayoutParams(lp);
}
private void setSecurityHeaderContainerVisibility(boolean landscape) {
mSecurityHeaderView.setVisibility(landscape ? VISIBLE : GONE);
}
private void updateBatteryMode() {
if (mConfigShowBatteryEstimate && !mHasCenterCutout) {
mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment