Loading packages/SystemUI/res/drawable/qs_background_primary.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <inset xmlns:android="http://schemas.android.com/apk/res/android"> <shape> <solid android:color="?android:attr/colorBackground"/> <corners android:radius="@dimen/notification_corner_radius" /> </shape> </inset> No newline at end of file packages/SystemUI/res/layout/qs_panel.xml +2 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ <View android:id="@+id/quick_settings_background" android:layout_width="match_parent" android:layout_height="0dp" /> android:layout_height="0dp" android:background="@drawable/qs_background_primary" /> <com.android.systemui.qs.NonInterceptingScrollView android:id="@+id/expanded_qs_scroll_view" Loading packages/SystemUI/res/values/flags.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <bool name="flag_notification_pipeline2">false</bool> <bool name="flag_notification_pipeline2_rendering">false</bool> <bool name="flag_shade_is_opaque">true</bool> <!-- b/171917882 --> <bool name="flag_notification_twocolumn">false</bool> Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +14 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class QSContainerImpl extends FrameLayout { private int mSideMargins; private boolean mQsDisabled; private boolean mBackgroundVisible; private int mContentPadding = -1; private boolean mAnimateBottomOnNextLayout; Loading Loading @@ -122,6 +123,14 @@ public class QSContainerImpl extends FrameLayout { return true; } /** * If QS should have a solid or transparent background. */ public void setBackgroundVisible(boolean visible) { mBackgroundVisible = visible; updateBackgroundVisibility(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // QSPanel will show as many rows as it can (up to TileLayout.MAX_ROWS) such that the Loading Loading @@ -174,7 +183,11 @@ public class QSContainerImpl extends FrameLayout { final boolean disabled = (state2 & DISABLE2_QUICK_SETTINGS) != 0; if (disabled == mQsDisabled) return; mQsDisabled = disabled; mBackground.setVisibility(mQsDisabled ? View.GONE : View.VISIBLE); updateBackgroundVisibility(); } private void updateBackgroundVisibility() { mBackground.setVisibility(mQsDisabled || !mBackgroundVisible ? GONE : VISIBLE); } void updateResources(QSPanelController qsPanelController, Loading packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +5 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.qs.customize.QSCustomizerController; import com.android.systemui.qs.dagger.QSFragmentComponent; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer; Loading Loading @@ -105,6 +106,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca private QSPanelController mQSPanelController; private QuickQSPanelController mQuickQSPanelController; private QSCustomizerController mQSCustomizerController; private FeatureFlags mFeatureFlags; @Inject public QSFragment(RemoteInputQuickSettingsDisabler remoteInputQsDisabler, Loading @@ -112,7 +114,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca StatusBarStateController statusBarStateController, CommandQueue commandQueue, QSDetailDisplayer qsDetailDisplayer, @Named(QS_PANEL) MediaHost qsMediaHost, @Named(QUICK_QS_PANEL) MediaHost qqsMediaHost, QSFragmentComponent.Factory qsComponentFactory) { QSFragmentComponent.Factory qsComponentFactory, FeatureFlags featureFlags) { mRemoteInputQuickSettingsDisabler = remoteInputQsDisabler; mInjectionInflater = injectionInflater; mCommandQueue = commandQueue; Loading @@ -122,6 +124,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca mQsComponentFactory = qsComponentFactory; commandQueue.observe(getLifecycle(), this); mHost = qsTileHost; mFeatureFlags = featureFlags; mStatusBarStateController = statusBarStateController; } Loading Loading @@ -163,6 +166,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca mQSContainerImplController = qsFragmentComponent.getQSContainerImplController(); mQSContainerImplController.init(); mContainer = mQSContainerImplController.getView(); mContainer.setBackgroundVisible(!mFeatureFlags.isShadeOpaque()); mQSDetail.setQsPanel(mQSPanelController, mHeader, mFooter); mQSAnimator = qsFragmentComponent.getQSAnimator(); Loading Loading
packages/SystemUI/res/drawable/qs_background_primary.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <inset xmlns:android="http://schemas.android.com/apk/res/android"> <shape> <solid android:color="?android:attr/colorBackground"/> <corners android:radius="@dimen/notification_corner_radius" /> </shape> </inset> No newline at end of file
packages/SystemUI/res/layout/qs_panel.xml +2 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ <View android:id="@+id/quick_settings_background" android:layout_width="match_parent" android:layout_height="0dp" /> android:layout_height="0dp" android:background="@drawable/qs_background_primary" /> <com.android.systemui.qs.NonInterceptingScrollView android:id="@+id/expanded_qs_scroll_view" Loading
packages/SystemUI/res/values/flags.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <bool name="flag_notification_pipeline2">false</bool> <bool name="flag_notification_pipeline2_rendering">false</bool> <bool name="flag_shade_is_opaque">true</bool> <!-- b/171917882 --> <bool name="flag_notification_twocolumn">false</bool> Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +14 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class QSContainerImpl extends FrameLayout { private int mSideMargins; private boolean mQsDisabled; private boolean mBackgroundVisible; private int mContentPadding = -1; private boolean mAnimateBottomOnNextLayout; Loading Loading @@ -122,6 +123,14 @@ public class QSContainerImpl extends FrameLayout { return true; } /** * If QS should have a solid or transparent background. */ public void setBackgroundVisible(boolean visible) { mBackgroundVisible = visible; updateBackgroundVisibility(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { // QSPanel will show as many rows as it can (up to TileLayout.MAX_ROWS) such that the Loading Loading @@ -174,7 +183,11 @@ public class QSContainerImpl extends FrameLayout { final boolean disabled = (state2 & DISABLE2_QUICK_SETTINGS) != 0; if (disabled == mQsDisabled) return; mQsDisabled = disabled; mBackground.setVisibility(mQsDisabled ? View.GONE : View.VISIBLE); updateBackgroundVisibility(); } private void updateBackgroundVisibility() { mBackground.setVisibility(mQsDisabled || !mBackgroundVisible ? GONE : VISIBLE); } void updateResources(QSPanelController qsPanelController, Loading
packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +5 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.qs.customize.QSCustomizerController; import com.android.systemui.qs.dagger.QSFragmentComponent; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer; Loading Loading @@ -105,6 +106,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca private QSPanelController mQSPanelController; private QuickQSPanelController mQuickQSPanelController; private QSCustomizerController mQSCustomizerController; private FeatureFlags mFeatureFlags; @Inject public QSFragment(RemoteInputQuickSettingsDisabler remoteInputQsDisabler, Loading @@ -112,7 +114,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca StatusBarStateController statusBarStateController, CommandQueue commandQueue, QSDetailDisplayer qsDetailDisplayer, @Named(QS_PANEL) MediaHost qsMediaHost, @Named(QUICK_QS_PANEL) MediaHost qqsMediaHost, QSFragmentComponent.Factory qsComponentFactory) { QSFragmentComponent.Factory qsComponentFactory, FeatureFlags featureFlags) { mRemoteInputQuickSettingsDisabler = remoteInputQsDisabler; mInjectionInflater = injectionInflater; mCommandQueue = commandQueue; Loading @@ -122,6 +124,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca mQsComponentFactory = qsComponentFactory; commandQueue.observe(getLifecycle(), this); mHost = qsTileHost; mFeatureFlags = featureFlags; mStatusBarStateController = statusBarStateController; } Loading Loading @@ -163,6 +166,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca mQSContainerImplController = qsFragmentComponent.getQSContainerImplController(); mQSContainerImplController.init(); mContainer = mQSContainerImplController.getView(); mContainer.setBackgroundVisible(!mFeatureFlags.isShadeOpaque()); mQSDetail.setQsPanel(mQSPanelController, mHeader, mFooter); mQSAnimator = qsFragmentComponent.getQSAnimator(); Loading