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

Commit 13f61624 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge "Add carrier status bar icons to ignore list in DSDS" into main

parents d3691746 546e518c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ constructor(
            if (qsVisible && field != value) {
                header.alpha = ShadeInterpolation.getContentAlpha(value)
                field = value
                updateIgnoredSlots()
            }
        }

@@ -538,7 +539,7 @@ constructor(

    private fun updateIgnoredSlots() {
        // switching from QQS to QS state halfway through the transition
        if (singleCarrier || qsExpandedFraction < 0.5) {
        if (singleCarrier || (!largeScreenActive && qsExpandedFraction < 0.5)) {
            iconContainer.removeIgnoredSlots(carrierIconSlots)
        } else {
            iconContainer.addIgnoredSlots(carrierIconSlots)
+4 −4
Original line number Diff line number Diff line
@@ -244,23 +244,23 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
    }

    @Test
    fun dualCarrier_disablesCarrierIconsInStatusIcons() {
    fun dualCarrier_disablesCarrierIconsInStatusIcons_qs() {
        whenever(mShadeCarrierGroupController.isSingleCarrier).thenReturn(false)

        makeShadeVisible()
        shadeHeaderController.qsExpandedFraction = 1.0f

        verify(statusIcons).addIgnoredSlots(carrierIconSlots)
        verify(statusIcons, times(2)).addIgnoredSlots(carrierIconSlots)
    }

    @Test
    fun dualCarrier_enablesCarrierIconsInStatusIcons_qsExpanded() {
    fun dualCarrier_disablesCarrierIconsInStatusIcons_qqs() {
        whenever(mShadeCarrierGroupController.isSingleCarrier).thenReturn(false)

        makeShadeVisible()
        shadeHeaderController.qsExpandedFraction = 0.0f

        verify(statusIcons, times(2)).removeIgnoredSlots(carrierIconSlots)
        verify(statusIcons, times(2)).addIgnoredSlots(carrierIconSlots)
    }

    @Test