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

Commit 546e518c authored by Shawn Lee's avatar Shawn Lee
Browse files

Add carrier status bar icons to ignore list in DSDS

Bug: 359870251
Test: manually verified status bar icon visibility in dual sim and single sim in landscape/large screen and portrait
Flag: EXEMPT bug fix
Change-Id: Ia1ead7f4804e50f12e890f67bf23501bf712fc8e
parent 4211f843
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