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

Commit 80a9d8be authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clean up launched flag "centralized_status_bar_height_fix"" into main

parents 79078168 1213e8c2
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -474,18 +474,6 @@ flag {
  }
}

flag {
   name: "centralized_status_bar_height_fix"
   namespace: "systemui"
   description: "Refactors shade header and keyguard status bar to read status bar dimens from a"
        " central place, instead of reading resources directly. This is to take into account display"
        " cutouts and other special cases. "
   bug: "317016114"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}

flag {
  name: "enable_layout_tracing"
  namespace: "systemui"
+1 −8
Original line number Diff line number Diff line
@@ -23,19 +23,16 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.android.compose.animation.scene.SceneScope
import com.android.compose.modifiers.thenIf
import com.android.systemui.Flags
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.MigrateClocksToBlueprint
import com.android.systemui.keyguard.ui.composable.modifier.burnInAware
import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel
import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters
import com.android.systemui.notifications.ui.composable.ConstrainedNotificationStack
import com.android.systemui.res.R
import com.android.systemui.shade.LargeScreenHeaderHelper
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
import com.android.systemui.statusbar.notification.stack.ui.view.NotificationScrollView
@@ -97,11 +94,7 @@ constructor(
        }

        val splitShadeTopMargin: Dp =
            if (Flags.centralizedStatusBarHeightFix()) {
            LargeScreenHeaderHelper.getLargeScreenHeaderHeight(LocalContext.current).dp
            } else {
                dimensionResource(id = R.dimen.large_screen_shade_header_height)
            }

        ConstrainedNotificationStack(
            stackScrollView = stackScrollView.get(),
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
        }

    @Test
    fun validatePaddingTopInSplitShade_refactorFlagOn_usesLargeHeaderHelper() =
    fun validatePaddingTopInSplitShade_usesLargeHeaderHelper() =
        testScope.runTest {
            whenever(largeScreenHeaderHelper.getLargeScreenHeaderHeight()).thenReturn(5)
            overrideResource(R.bool.config_use_split_notification_shade, true)
+1 −8
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import androidx.constraintlayout.widget.ConstraintSet.END
import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.TOP
import com.android.systemui.Flags.centralizedStatusBarHeightFix
import com.android.systemui.keyguard.MigrateClocksToBlueprint
import com.android.systemui.res.R
import com.android.systemui.shade.LargeScreenHeaderHelper
@@ -64,13 +63,7 @@ constructor(
                val useLargeScreenHeader =
                    context.resources.getBoolean(R.bool.config_use_large_screen_shade_header)
                val marginTopLargeScreen =
                    if (centralizedStatusBarHeightFix()) {
                    largeScreenHeaderHelperLazy.get().getLargeScreenHeaderHeight()
                    } else {
                        context.resources.getDimensionPixelSize(
                            R.dimen.large_screen_shade_header_height
                        )
                    }
                connect(
                    R.id.nssl_placeholder,
                    TOP,
+1 −8
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.systemui.qs;

import static android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS;

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

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
@@ -194,12 +192,7 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
            QuickStatusBarHeaderController quickStatusBarHeaderController) {
        int topPadding = QSUtils.getQsHeaderSystemIconsAreaHeight(mContext);
        if (!LargeScreenUtils.shouldUseLargeScreenShadeHeader(mContext.getResources())) {
            topPadding =
                    centralizedStatusBarHeightFix()
                            ? LargeScreenHeaderHelper.getLargeScreenHeaderHeight(mContext)
                            : mContext.getResources()
                                    .getDimensionPixelSize(
                                            R.dimen.large_screen_shade_header_height);
            topPadding = LargeScreenHeaderHelper.getLargeScreenHeaderHeight(mContext);
        }
        if (mQSPanelContainer != null) {
            mQSPanelContainer.setPaddingRelative(
Loading