Loading packages/SystemUI/res/values-land/dimens.xml +2 −2 Original line number Diff line number Diff line Loading @@ -32,11 +32,11 @@ --> <dimen name="qs_customize_header_min_height">48dp</dimen> <!-- In landscape the security footer is actually part of the header, and needs to be as short as the header --> <dimen name="qs_security_footer_single_line_height">@*android:dimen/quick_qs_offset_height</dimen> <dimen name="qs_footer_padding">14dp</dimen> <dimen name="qs_footers_margin_bottom">0dp</dimen> <dimen name="qs_security_footer_background_inset">12dp</dimen> <dimen name="qs_security_footer_corner_radius">28dp</dimen> <dimen name="battery_detail_graph_space_top">9dp</dimen> <dimen name="battery_detail_graph_space_bottom">9dp</dimen> Loading packages/SystemUI/res/values-sw600dp/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,6 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">4</integer> <!-- How many lines to show in the security footer --> <integer name="qs_security_footer_maxLines">1</integer> </resources> packages/SystemUI/res/values-sw600dp/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,9 @@ <dimen name="controls_top_margin">24dp</dimen> <dimen name="global_actions_grid_item_layout_height">80dp</dimen> <!-- For large screens the security footer appears below the footer, same as phones in portrait --> <dimen name="qs_security_footer_single_line_height">48dp</dimen> <dimen name="qs_security_footer_background_inset">0dp</dimen> </resources> packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +20 −21 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.systemui.settings.brightness.BrightnessSlider; import com.android.systemui.statusbar.policy.BrightnessMirrorController; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; import com.android.systemui.util.animation.UniqueObjectHostView; import java.util.ArrayList; import java.util.List; Loading Loading @@ -316,7 +315,6 @@ public class QSPanel extends LinearLayout implements Tunable { super.onConfigurationChanged(newConfig); mOnConfigurationChangedListeners.forEach( listener -> listener.onConfigurationChange(newConfig)); switchSecurityFooter(); } @Override Loading Loading @@ -359,25 +357,21 @@ public class QSPanel extends LinearLayout implements Tunable { switchToParent(mFooter, parent, index); index++; } // The security footer is switched on orientation changes } private void switchSecurityFooter() { if (mSecurityFooter != null) { if (mContext.getResources().getConfiguration().orientation /** Switch the security footer between top and bottom of QS depending on orientation. */ public void switchSecurityFooter(boolean shouldUseSplitNotificationShade) { if (mSecurityFooter == null) return; if (!shouldUseSplitNotificationShade && mContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && mHeaderContainer != null) { // Adding the security view to the header, that enables us to avoid scrolling switchToParent(mSecurityFooter, mHeaderContainer, 0); } else { // Where should this go? If there's media, right before it. Otherwise, at the end. View mediaView = findViewByPredicate(v -> v instanceof UniqueObjectHostView); int index = -1; if (mediaView != null) { index = indexOfChild(mediaView); } switchToParent(mSecurityFooter, this, index); } // Add after the footer int index = indexOfChild(mFooter); switchToParent(mSecurityFooter, this, index + 1); } } Loading Loading @@ -652,9 +646,14 @@ public class QSPanel extends LinearLayout implements Tunable { return mListening; } public void setSecurityFooter(View view) { /** * Set the security footer view and switch it into the right place * @param view the view in question * @param shouldUseSplitNotificationShade if QS is in split shade mode */ public void setSecurityFooter(View view, boolean shouldUseSplitNotificationShade) { mSecurityFooter = view; switchSecurityFooter(); switchSecurityFooter(shouldUseSplitNotificationShade); } protected void setPageMargin(int pageMargin) { Loading packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +2 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { refreshAllTiles(); } updateBrightnessMirror(); mView.switchSecurityFooter(mShouldUseSplitNotificationShade); } }; Loading Loading @@ -141,7 +142,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { refreshAllTiles(); } mView.addOnConfigurationChangedListener(mOnConfigurationChangedListener); mView.setSecurityFooter(mQsSecurityFooter.getView()); mView.setSecurityFooter(mQsSecurityFooter.getView(), mShouldUseSplitNotificationShade); switchTileLayout(true); if (mBrightnessMirrorController != null) { mBrightnessMirrorController.addCallback(mBrightnessMirrorListener); Loading Loading
packages/SystemUI/res/values-land/dimens.xml +2 −2 Original line number Diff line number Diff line Loading @@ -32,11 +32,11 @@ --> <dimen name="qs_customize_header_min_height">48dp</dimen> <!-- In landscape the security footer is actually part of the header, and needs to be as short as the header --> <dimen name="qs_security_footer_single_line_height">@*android:dimen/quick_qs_offset_height</dimen> <dimen name="qs_footer_padding">14dp</dimen> <dimen name="qs_footers_margin_bottom">0dp</dimen> <dimen name="qs_security_footer_background_inset">12dp</dimen> <dimen name="qs_security_footer_corner_radius">28dp</dimen> <dimen name="battery_detail_graph_space_top">9dp</dimen> <dimen name="battery_detail_graph_space_bottom">9dp</dimen> Loading
packages/SystemUI/res/values-sw600dp/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,6 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">4</integer> <!-- How many lines to show in the security footer --> <integer name="qs_security_footer_maxLines">1</integer> </resources>
packages/SystemUI/res/values-sw600dp/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,9 @@ <dimen name="controls_top_margin">24dp</dimen> <dimen name="global_actions_grid_item_layout_height">80dp</dimen> <!-- For large screens the security footer appears below the footer, same as phones in portrait --> <dimen name="qs_security_footer_single_line_height">48dp</dimen> <dimen name="qs_security_footer_background_inset">0dp</dimen> </resources>
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +20 −21 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.systemui.settings.brightness.BrightnessSlider; import com.android.systemui.statusbar.policy.BrightnessMirrorController; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; import com.android.systemui.util.animation.UniqueObjectHostView; import java.util.ArrayList; import java.util.List; Loading Loading @@ -316,7 +315,6 @@ public class QSPanel extends LinearLayout implements Tunable { super.onConfigurationChanged(newConfig); mOnConfigurationChangedListeners.forEach( listener -> listener.onConfigurationChange(newConfig)); switchSecurityFooter(); } @Override Loading Loading @@ -359,25 +357,21 @@ public class QSPanel extends LinearLayout implements Tunable { switchToParent(mFooter, parent, index); index++; } // The security footer is switched on orientation changes } private void switchSecurityFooter() { if (mSecurityFooter != null) { if (mContext.getResources().getConfiguration().orientation /** Switch the security footer between top and bottom of QS depending on orientation. */ public void switchSecurityFooter(boolean shouldUseSplitNotificationShade) { if (mSecurityFooter == null) return; if (!shouldUseSplitNotificationShade && mContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && mHeaderContainer != null) { // Adding the security view to the header, that enables us to avoid scrolling switchToParent(mSecurityFooter, mHeaderContainer, 0); } else { // Where should this go? If there's media, right before it. Otherwise, at the end. View mediaView = findViewByPredicate(v -> v instanceof UniqueObjectHostView); int index = -1; if (mediaView != null) { index = indexOfChild(mediaView); } switchToParent(mSecurityFooter, this, index); } // Add after the footer int index = indexOfChild(mFooter); switchToParent(mSecurityFooter, this, index + 1); } } Loading Loading @@ -652,9 +646,14 @@ public class QSPanel extends LinearLayout implements Tunable { return mListening; } public void setSecurityFooter(View view) { /** * Set the security footer view and switch it into the right place * @param view the view in question * @param shouldUseSplitNotificationShade if QS is in split shade mode */ public void setSecurityFooter(View view, boolean shouldUseSplitNotificationShade) { mSecurityFooter = view; switchSecurityFooter(); switchSecurityFooter(shouldUseSplitNotificationShade); } protected void setPageMargin(int pageMargin) { Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +2 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { refreshAllTiles(); } updateBrightnessMirror(); mView.switchSecurityFooter(mShouldUseSplitNotificationShade); } }; Loading Loading @@ -141,7 +142,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { refreshAllTiles(); } mView.addOnConfigurationChangedListener(mOnConfigurationChangedListener); mView.setSecurityFooter(mQsSecurityFooter.getView()); mView.setSecurityFooter(mQsSecurityFooter.getView(), mShouldUseSplitNotificationShade); switchTileLayout(true); if (mBrightnessMirrorController != null) { mBrightnessMirrorController.addCallback(mBrightnessMirrorListener); Loading