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

Commit 97d57d14 authored by Shawn Lee's avatar Shawn Lee
Browse files

Update QS top padding to use centralizedStatusBarHeight refactor

When centralizedStatusBarHeight flag was flipped, QS and NSSL were using different values for the status bar height, leading to a visual discrepancy with the notification scrim expanded.

Bug: 321755315
Test: manually verified with flag on and off
Flag: NONE
Change-Id: Iafd5c1441d4ff749dd08b7f8de81a0012ac2c135
parent 0104e414
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ package com.android.systemui.qs;
import static android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static com.android.systemui.Flags.centralizedStatusBarHeightFix;

import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -27,6 +29,7 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.android.systemui.res.R;
import com.android.systemui.shade.LargeScreenHeaderHelper;
import com.android.systemui.util.LargeScreenUtils;

/**
@@ -97,7 +100,9 @@ public class QuickStatusBarHeader extends FrameLayout {
            qqsLP.topMargin = mContext.getResources()
                    .getDimensionPixelSize(R.dimen.qqs_layout_margin_top);
        } else {
            qqsLP.topMargin = mContext.getResources()
            qqsLP.topMargin = centralizedStatusBarHeightFix()
                    ? LargeScreenHeaderHelper.getLargeScreenHeaderHeight(mContext)
                    : mContext.getResources()
                    .getDimensionPixelSize(R.dimen.large_screen_shade_header_min_height);
        }
        mHeaderQsPanel.setLayoutParams(qqsLP);