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

Commit 6e5dc956 authored by Liana Kazanova (xWF)'s avatar Liana Kazanova (xWF) Committed by Android (Google) Code Review
Browse files

Revert "[Notif redesign] Increase the NSSL's bottom margin"

This reverts commit 377d8a6a.

Reason for revert: DroidMonitor: Reverting due to http://b/394267392 (go/jank-rotation-playbook)

Change-Id: I6df3db7740ec390f13a44578f17a79e67ecb6e31
parent 377d8a6a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ import android.platform.test.flag.junit.FlagsParameterization
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
import com.android.keyguard.BouncerPanelExpansionCalculator.aboutToShowBouncerProgress
import com.android.systemui.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.animation.ShadeInterpolation.getContentAlpha
import com.android.systemui.dump.DumpManager
@@ -482,11 +481,7 @@ class StackScrollAlgorithmTest(flags: FlagsParameterization) : SysuiTestCase() {
        stackScrollAlgorithm.resetViewStates(ambientState, /* speedBumpIndex= */ 0)

        val marginBottom =
            context.resources.getDimensionPixelSize(
                if (Flags.notificationsRedesignFooterView())
                    R.dimen.notification_2025_panel_margin_bottom
                else R.dimen.notification_panel_margin_bottom
            )
            context.resources.getDimensionPixelSize(R.dimen.notification_panel_margin_bottom)
        val fullHeight = ambientState.layoutMaxHeight + marginBottom - ambientState.stackY
        val centeredY = ambientState.stackY + fullHeight / 2f - emptyShadeView.height / 2f
        assertThat(emptyShadeView.viewState.yTranslation).isEqualTo(centeredY)
+0 −17
Original line number Diff line number Diff line
@@ -19,12 +19,9 @@

package com.android.systemui.statusbar.notification.stack.ui.viewmodel

import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import androidx.test.filters.SmallTest
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags.FLAG_NOTIFICATIONS_REDESIGN_FOOTER_VIEW
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.data.repository.keyguardBouncerRepository
import com.android.systemui.common.shared.model.NotificationContainerBounds
@@ -301,7 +298,6 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
        }

    @Test
    @DisableFlags(FLAG_NOTIFICATIONS_REDESIGN_FOOTER_VIEW)
    fun validateMarginBottom() =
        testScope.runTest {
            overrideResource(R.dimen.notification_panel_margin_bottom, 50)
@@ -313,19 +309,6 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
            assertThat(dimens!!.marginBottom).isEqualTo(50)
        }

    @Test
    @EnableFlags(FLAG_NOTIFICATIONS_REDESIGN_FOOTER_VIEW)
    fun validateMarginBottom_footerRedesign() =
        testScope.runTest {
            overrideResource(R.dimen.notification_2025_panel_margin_bottom, 50)

            val dimens by collectLastValue(underTest.configurationBasedDimensions)

            configurationRepository.onAnyConfigurationChange()

            assertThat(dimens!!.marginBottom).isEqualTo(50)
        }

    @Test
    @DisableSceneContainer
    fun validateMarginTopWithLargeScreenHeader_usesHelper() =
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
-->

<!-- This XML is served to be overridden by other OEMs/device types. -->
<!-- Note: The margins may be overridden in code, see NotificationStackScrollLayout#getBottomMargin -->
<com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
+0 −2
Original line number Diff line number Diff line
@@ -574,8 +574,6 @@

    <dimen name="notification_panel_margin_bottom">32dp</dimen>

    <dimen name="notification_2025_panel_margin_bottom">64dp</dimen>

    <!-- The bottom padding of the panel that holds the list of notifications. -->
    <dimen name="notification_panel_padding_bottom">0dp</dimen>

+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import com.android.systemui.recents.LauncherProxyService.LauncherProxyListener
import com.android.systemui.res.R
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.shared.system.QuickStepContract
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
import com.android.systemui.statusbar.policy.SplitShadeStateController
import com.android.systemui.util.LargeScreenUtils
@@ -156,7 +155,8 @@ constructor(
        val splitShadeEnabledChanged = newSplitShadeEnabled != splitShadeEnabled
        splitShadeEnabled = newSplitShadeEnabled
        largeScreenShadeHeaderActive = LargeScreenUtils.shouldUseLargeScreenShadeHeader(resources)
        notificationsBottomMargin = NotificationStackScrollLayout.getBottomMargin(context)
        notificationsBottomMargin =
            resources.getDimensionPixelSize(R.dimen.notification_panel_margin_bottom)
        largeScreenShadeHeaderHeight = calculateLargeShadeHeaderHeight()
        shadeHeaderHeight = calculateShadeHeaderHeight()
        panelMarginHorizontal =
Loading