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

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

Merge "[SB] Remove status_bar_stop_updating_window_height flag." into main

parents a5e4de89 87361e72
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -450,17 +450,6 @@ flag {
    }
}

flag {
    name: "status_bar_stop_updating_window_height"
    namespace: "systemui"
    description: "Don't have PhoneStatusBarView manually trigger an update of the height in "
        "StatusBarWindowController"
    bug: "360115167"
    metadata {
      purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "status_bar_popup_chips"
    namespace: "systemui"
+0 −3
Original line number Diff line number Diff line
@@ -338,9 +338,6 @@ public class PhoneStatusBarView extends FrameLayout {
    }

    private void updateWindowHeight() {
        if (Flags.statusBarStopUpdatingWindowHeight()) {
            return;
        }
        if (StatusBarConnectedDisplays.isEnabled()) {
            // Handled directly from StatusBarWindowControllerImpl (for each display)
            return;
+12 −39
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.view.View
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
import com.android.systemui.Flags.FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT
import com.android.systemui.Flags.FLAG_STATUS_BAR_SWIPE_OVER_CHIP
import com.android.systemui.Gefingerpoken
import com.android.systemui.SysuiTestCase
@@ -187,50 +186,24 @@ class PhoneStatusBarViewTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT)
    @DisableFlags(FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onAttachedToWindow_stopUpdatingHeightFlagOn_connectedDisplayFlagOff_doesNotUpdateWindowHeight() {
    fun onAttachedToWindow_connectedDisplayFlagOff_updatesWindowHeight() {
        view.onAttachedToWindow()

        verify(windowController, never()).refreshStatusBarHeight()
        verify(windowController).refreshStatusBarHeight()
    }

    @Test
    @DisableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT)
    @EnableFlags(FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onAttachedToWindow_stopUpdatingHeightFlagOff_connectedDisplayFlagOn_doesNotUpdateWindowHeight() {
    fun onAttachedToWindow_connectedDisplayFlagOn_doesNotUpdateWindowHeight() {
        view.onAttachedToWindow()

        verify(windowController, never()).refreshStatusBarHeight()
    }

    @Test
    @DisableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT, FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onAttachedToWindow_stopUpdatingHeightFlagOff_connectedDisplayFlagOff_updatesWindowHeight() {
        view.onAttachedToWindow()

        verify(windowController).refreshStatusBarHeight()
    }

    @Test
    @DisableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT, FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onConfigurationChanged_stopUpdatingHeightFlagOff_connectedDisplayFlagOff_updatesWindowHeight() {
        view.onConfigurationChanged(Configuration())

        verify(windowController).refreshStatusBarHeight()
    }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT)
    fun onConfigurationChanged_stopUpdatingHeightFlagOn_doesNotUpdateWindowHeight() {
        view.onConfigurationChanged(Configuration())

        verify(windowController, never()).refreshStatusBarHeight()
    }

    @Test
    @DisableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT, FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onConfigurationChanged_multipleCalls_stopUpdatingHeightFlagOff_updatesWindowHeightMultipleTimes() {
    @DisableFlags(FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onConfigurationChanged_connectedDisplayFlagOff_updatesWindowHeight() {
    view.onConfigurationChanged(Configuration())
    view.onConfigurationChanged(Configuration())
    view.onConfigurationChanged(Configuration())
@@ -240,8 +213,8 @@ class PhoneStatusBarViewTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(FLAG_STATUS_BAR_STOP_UPDATING_WINDOW_HEIGHT)
    fun onConfigurationChanged_multipleCalls_stopUpdatingHeightFlagOn_neverUpdatesWindowHeight() {
    @EnableFlags(FLAG_STATUS_BAR_CONNECTED_DISPLAYS)
    fun onConfigurationChanged_connectedDisplayFlagOn_neverUpdatesWindowHeight() {
        view.onConfigurationChanged(Configuration())
        view.onConfigurationChanged(Configuration())
        view.onConfigurationChanged(Configuration())