Merge "Hide security footer container (QSBH) in portrait" into sc-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fc5c95cbc4
@@ -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"
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
// Don't need to worry about tuner settings for this icon
|
// Don't need to worry about tuner settings for this icon
|
||||||
mBatteryRemainingIcon.setIgnoreTunerUpdates(true);
|
mBatteryRemainingIcon.setIgnoreTunerUpdates(true);
|
||||||
@@ -191,6 +195,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
|
||||||
@@ -211,6 +217,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