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

Unverified Commit a1d06764 authored by Danny Lin's avatar Danny Lin Committed by Michael Bestas
Browse files

SystemUI: Allow Wi-Fi/cell tiles to co-exist with provider model



The dedicated Wi-Fi/cellular data QS tiles are partially working now
that we've exposed them in the list of tile options, but they're very
buggy and somewhat broken when the provider model (unified internet) is
enabled.

Allow the tiles to co-exist with InternetTile and the provider model
(including both settings_provider_model and combined signal icons) by
always including QS icons in Wi-Fi/data indicator callbacks, and add
a new flag to indicate whether they should be shown in the internet
tile.

Co-Authored-By: default avatarChirayu Desai <chirayu@calyxinstitute.org>
Co-authored-by: default avatarMichael Bestas <mkbestas@gmail.com>
Change-Id: I10af134b35dfabdb9275f1aca8ca8512e1db6d27
parent 48c34e3a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ public class CastTileTest extends SysuiTestCase {
        WifiIndicators indicators = new WifiIndicators(
                false, mock(IconState.class),
                qsIcon, false, false, "",
                false, "");
                false, "", true);
        mSignalCallback.setWifiIndicators(indicators);
        mTestableLooper.processAllMessages();

@@ -156,7 +156,7 @@ public class CastTileTest extends SysuiTestCase {
        WifiIndicators indicators = new WifiIndicators(
                true, mock(IconState.class),
                qsIcon, false, false, "",
                false, "");
                false, "", true);
        mSignalCallback.setWifiIndicators(indicators);
        mTestableLooper.processAllMessages();

@@ -168,7 +168,7 @@ public class CastTileTest extends SysuiTestCase {
        WifiIndicators indicators = new WifiIndicators(
                true, mock(IconState.class),
                qsIcon, false, false, "",
                false, "");
                false, "", true);
        mSignalCallback.setWifiIndicators(indicators);
        mTestableLooper.processAllMessages();
    }
+2 −1
Original line number Diff line number Diff line
@@ -186,7 +186,8 @@ public class InternetTileTest extends SysuiTestCase {
            /* activityOut= */ false,
            /* description= */ null,
            /* isTransient= */ false,
            /* statusLabel= */ null
            /* statusLabel= */ null,
            /* isDefault= */ true
        );
        mTile.mSignalCallback.setWifiIndicators(wifiIndicators);
        IconState state = new IconState(true, 0, "");
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ public class ShadeCarrierGroupControllerTest extends LeakCheckedTest {
        MobileDataIndicators indicators = new MobileDataIndicators(
                mock(IconState.class),
                mock(IconState.class),
                0, 0, true, true, "", "", "", 0, true, true);
                0, 0, true, true, "", "", "", 0, true, true, true);
        mSignalCallback.setMobileDataIndicators(indicators);
    }

+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ public class CallbackHandlerTest extends SysuiTestCase {
        String description = "Test";
        String secondaryLabel = "Secondary label";
        WifiIndicators indicators = new WifiIndicators(
                enabled, status, qs, in, out, description, true, secondaryLabel);
                enabled, status, qs, in, out, description, true, secondaryLabel, true);
        mHandler.setWifiIndicators(indicators);
        waitForCallbacks();

@@ -120,7 +120,7 @@ public class CallbackHandlerTest extends SysuiTestCase {
        boolean roaming = true;
        MobileDataIndicators indicators = new MobileDataIndicators(
                status, qs, type, qsType, in, out, typeDescription,
                typeDescriptionHtml, description, subId, roaming, true);
                typeDescriptionHtml, description, subId, roaming, true, true);
        mHandler.setMobileDataIndicators(indicators);
        waitForCallbacks();

+4 −1
Original line number Diff line number Diff line
@@ -315,6 +315,9 @@ public class InternetTile extends QSTileImpl<QSTile.BooleanState> {
            if (DEBUG) {
                Log.d(TAG, "setWifiIndicators: " + indicators);
            }
            if (!indicators.isDefault) {
                return;
            }
            synchronized (mWifiInfo) {
                mWifiInfo.mEnabled = indicators.enabled;
                mWifiInfo.mSsid = indicators.description;
@@ -340,7 +343,7 @@ public class InternetTile extends QSTileImpl<QSTile.BooleanState> {
            if (DEBUG) {
                Log.d(TAG, "setMobileDataIndicators: " + indicators);
            }
            if (indicators.qsIcon == null) {
            if (indicators.qsIcon == null || !indicators.isDefault) {
                // Not data sim, don't display.
                return;
            }
Loading