Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −3 Original line number Diff line number Diff line Loading @@ -297,9 +297,7 @@ public class QSContainerImpl extends FrameLayout { // start margin of next page). qsPanelController.setPageMargin(2 * mSideMargins); } else if (view == mHeader) { // The header contains the QQS panel which needs to have special padding, to // visually align them. quickStatusBarHeaderController.setContentMargins(mContentPadding, mContentPadding); // No content padding for the header. } else { view.setPaddingRelative( mContentPadding, Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +4 −19 Original line number Diff line number Diff line Loading @@ -77,8 +77,6 @@ public class QuickStatusBarHeader extends FrameLayout { private int mStatusBarPaddingTop = 0; private int mRoundedCornerPadding = 0; private int mContentMarginStart; private int mContentMarginEnd; private int mWaterfallTopInset; private int mCutOutPaddingLeft; private int mCutOutPaddingRight; Loading Loading @@ -361,6 +359,8 @@ public class QuickStatusBarHeader extends FrameLayout { } private void updateHeadersPadding() { setContentMargins(mDatePrivacyView, 0, 0); setContentMargins(mClockIconsView, 0, 0); int paddingLeft = 0; int paddingRight = 0; Loading @@ -374,14 +374,12 @@ public class QuickStatusBarHeader extends FrameLayout { if (mCutOutPaddingLeft > 0) { // if there's a cutout, let's use at least the rounded corner inset int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding); int contentMarginLeft = isLayoutRtl() ? mContentMarginEnd : mContentMarginStart; paddingLeft = Math.max(cutoutPadding - contentMarginLeft - leftMargin, 0); paddingLeft = Math.max(cutoutPadding - leftMargin, 0); } if (mCutOutPaddingRight > 0) { // if there's a cutout, let's use at least the rounded corner inset int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding); int contentMarginRight = isLayoutRtl() ? mContentMarginStart : mContentMarginEnd; paddingRight = Math.max(cutoutPadding - contentMarginRight - rightMargin, 0); paddingRight = Math.max(cutoutPadding - rightMargin, 0); } mDatePrivacyView.setPadding(paddingLeft, Loading @@ -402,19 +400,6 @@ public class QuickStatusBarHeader extends FrameLayout { mHeaderQsPanel.setCallback(qsPanelCallback); } /** */ public void setContentMargins(int marginStart, int marginEnd, QuickQSPanelController quickQSPanelController) { mContentMarginStart = marginStart; mContentMarginEnd = marginEnd; // The clock and QQS are not direct children, but the container should be just a wrapper to // be able to move them together. So we set the margins to the actual views. quickQSPanelController.setContentMargins(0, 0); setContentMargins(mDatePrivacyView, marginStart, marginEnd); setContentMargins(mClockIconsView, marginStart, marginEnd); updateHeadersPadding(); } private void setContentMargins(View view, int marginStart, int marginEnd) { MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams(); lp.setMarginStart(marginStart); Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +1 −5 Original line number Diff line number Diff line Loading @@ -183,6 +183,7 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader mView.onAttach(mIconManager, mQSExpansionPathInterpolator); mDemoModeController.addCallback(mDemoModeReceiver); mHeaderQsPanelController.setContentMargins(0, 0); } @Override Loading Loading @@ -259,11 +260,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader return mMicCameraIndicatorsEnabled || mLocationIndicatorsEnabled; } public void setContentMargins(int contentPaddingStart, int contentPaddingEnd) { mView.setContentMargins(contentPaddingStart, contentPaddingEnd, mHeaderQsPanelController); } private static class ClockDemoModeReceiver implements DemoMode { private Clock mClockView; Loading Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −3 Original line number Diff line number Diff line Loading @@ -297,9 +297,7 @@ public class QSContainerImpl extends FrameLayout { // start margin of next page). qsPanelController.setPageMargin(2 * mSideMargins); } else if (view == mHeader) { // The header contains the QQS panel which needs to have special padding, to // visually align them. quickStatusBarHeaderController.setContentMargins(mContentPadding, mContentPadding); // No content padding for the header. } else { view.setPaddingRelative( mContentPadding, Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +4 −19 Original line number Diff line number Diff line Loading @@ -77,8 +77,6 @@ public class QuickStatusBarHeader extends FrameLayout { private int mStatusBarPaddingTop = 0; private int mRoundedCornerPadding = 0; private int mContentMarginStart; private int mContentMarginEnd; private int mWaterfallTopInset; private int mCutOutPaddingLeft; private int mCutOutPaddingRight; Loading Loading @@ -361,6 +359,8 @@ public class QuickStatusBarHeader extends FrameLayout { } private void updateHeadersPadding() { setContentMargins(mDatePrivacyView, 0, 0); setContentMargins(mClockIconsView, 0, 0); int paddingLeft = 0; int paddingRight = 0; Loading @@ -374,14 +374,12 @@ public class QuickStatusBarHeader extends FrameLayout { if (mCutOutPaddingLeft > 0) { // if there's a cutout, let's use at least the rounded corner inset int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding); int contentMarginLeft = isLayoutRtl() ? mContentMarginEnd : mContentMarginStart; paddingLeft = Math.max(cutoutPadding - contentMarginLeft - leftMargin, 0); paddingLeft = Math.max(cutoutPadding - leftMargin, 0); } if (mCutOutPaddingRight > 0) { // if there's a cutout, let's use at least the rounded corner inset int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding); int contentMarginRight = isLayoutRtl() ? mContentMarginStart : mContentMarginEnd; paddingRight = Math.max(cutoutPadding - contentMarginRight - rightMargin, 0); paddingRight = Math.max(cutoutPadding - rightMargin, 0); } mDatePrivacyView.setPadding(paddingLeft, Loading @@ -402,19 +400,6 @@ public class QuickStatusBarHeader extends FrameLayout { mHeaderQsPanel.setCallback(qsPanelCallback); } /** */ public void setContentMargins(int marginStart, int marginEnd, QuickQSPanelController quickQSPanelController) { mContentMarginStart = marginStart; mContentMarginEnd = marginEnd; // The clock and QQS are not direct children, but the container should be just a wrapper to // be able to move them together. So we set the margins to the actual views. quickQSPanelController.setContentMargins(0, 0); setContentMargins(mDatePrivacyView, marginStart, marginEnd); setContentMargins(mClockIconsView, marginStart, marginEnd); updateHeadersPadding(); } private void setContentMargins(View view, int marginStart, int marginEnd) { MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams(); lp.setMarginStart(marginStart); Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +1 −5 Original line number Diff line number Diff line Loading @@ -183,6 +183,7 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader mView.onAttach(mIconManager, mQSExpansionPathInterpolator); mDemoModeController.addCallback(mDemoModeReceiver); mHeaderQsPanelController.setContentMargins(0, 0); } @Override Loading Loading @@ -259,11 +260,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader return mMicCameraIndicatorsEnabled || mLocationIndicatorsEnabled; } public void setContentMargins(int contentPaddingStart, int contentPaddingEnd) { mView.setContentMargins(contentPaddingStart, contentPaddingEnd, mHeaderQsPanelController); } private static class ClockDemoModeReceiver implements DemoMode { private Clock mClockView; Loading