Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a63715b authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Remove legacy QS background

Bug: 186117823
Test: manual
Test: atest ScrimControllerTest
Change-Id: I96cbe9bc61e17256a9a9e7a41b5053c7e60591f0
parent 424b267e
Loading
Loading
Loading
Loading
+0 −22
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="?attr/underSurfaceColor"/>
        <corners android:radius="@dimen/notification_corner_radius" />
    </shape>
</inset>
 No newline at end of file
+0 −7
Original line number Diff line number Diff line
@@ -21,13 +21,6 @@
    android:clipToPadding="false"
    android:clipChildren="false" >

    <!-- Main QS background -->
    <View
        android:id="@+id/quick_settings_background"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="@drawable/qs_background_primary" />

    <com.android.systemui.qs.NonInterceptingScrollView
        android:id="@+id/expanded_qs_scroll_view"
        android:layout_width="match_parent"
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
    <bool name="flag_notification_pipeline2_rendering">false</bool>
    <bool name="flag_notif_updates">true</bool>

    <bool name="flag_shade_is_opaque">true</bool>
    <bool name="flag_monet">false</bool>

    <!-- b/171917882 -->
+1 −23
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public class QSContainerImpl extends FrameLayout {
    private int mFancyClippingBottom;
    private final float[] mFancyClippingRadii = new float[] {0, 0, 0, 0, 0, 0, 0, 0};
    private  final Path mFancyClippingPath = new Path();
    private int mBackgroundBottom = -1;
    private int mBackgroundBottom = 0;
    private int mHeightOverride = -1;
    private View mQSDetail;
    private QuickStatusBarHeader mHeader;
@@ -68,11 +68,8 @@ public class QSContainerImpl extends FrameLayout {
    private QSCustomizer mQSCustomizer;
    private NonInterceptingScrollView mQSPanelContainer;

    private View mBackground;

    private int mSideMargins;
    private boolean mQsDisabled;
    private boolean mBackgroundVisible;
    private int mContentPadding = -1;
    private boolean mAnimateBottomOnNextLayout;
    private int mNavBarInset = 0;
@@ -89,7 +86,6 @@ public class QSContainerImpl extends FrameLayout {
        mQSDetail = findViewById(R.id.qs_detail);
        mHeader = findViewById(R.id.header);
        mQSCustomizer = findViewById(R.id.qs_customize);
        mBackground = findViewById(R.id.quick_settings_background);
        mHeader.getHeaderQsPanel().setMediaVisibilityChangedListener((visible) -> {
            if (mHeader.getHeaderQsPanel().isShown()) {
                mAnimateBottomOnNextLayout = true;
@@ -111,13 +107,9 @@ public class QSContainerImpl extends FrameLayout {
        // We're saving the bottom separately since otherwise the bottom would be overridden in
        // the layout and the animation wouldn't properly start at the old position.
        mBackgroundBottom = value;
        mBackground.setBottom(value);
    }

    private float getBackgroundBottom() {
        if (mBackgroundBottom == -1) {
            return mBackground.getBottom();
        }
        return mBackgroundBottom;
    }

@@ -134,14 +126,6 @@ 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
    public WindowInsets onApplyWindowInsets(WindowInsets insets) {
        mNavBarInset = insets.getInsets(WindowInsets.Type.navigationBars()).bottom;
@@ -208,11 +192,6 @@ public class QSContainerImpl extends FrameLayout {
        final boolean disabled = (state2 & DISABLE2_QUICK_SETTINGS) != 0;
        if (disabled == mQsDisabled) return;
        mQsDisabled = disabled;
        updateBackgroundVisibility();
    }

    private void updateBackgroundVisibility() {
        mBackground.setVisibility(mQsDisabled || !mBackgroundVisible ? GONE : VISIBLE);
    }

    void updateResources(QSPanelController qsPanelController,
@@ -260,7 +239,6 @@ public class QSContainerImpl extends FrameLayout {
        mQSDetail.setBottom(getTop() + scrollBottom);
        int qsDetailBottomMargin = ((MarginLayoutParams) mQSDetail.getLayoutParams()).bottomMargin;
        mQSDetail.setBottom(getTop() + scrollBottom - qsDetailBottomMargin);
        mBackground.setTop(mQSPanelContainer.getTop());
        updateBackgroundBottom(scrollBottom, animate);
    }

+0 −1
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ 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