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

Commit f65d2246 authored by Benedict Wong's avatar Benedict Wong Committed by yinxu
Browse files

Keep the merged WiFi indicators when WiFi toggle changes.

The merged WiFi indicators are feteched from the WiFiInfo, so when WiFi
toggle changes we should not clear the indicators.

Bug: 208868291
Test: Unit test NetworkControllerWifiTest, manual test
Change-Id: I7d2724bdc92b92b52350d132bb673489818f261c
parent 76ee1c46
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -261,8 +261,6 @@ public class WifiStatusTracker {
    private void updateWifiState() {
        state = mWifiManager.getWifiState();
        enabled = state == WifiManager.WIFI_STATE_ENABLED;
        isCarrierMerged = false;
        subId = 0;
    }

    private void updateRssi(int newRssi) {
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup>
    @Override
    public void notifyListeners(SignalCallback callback) {
        if (mCurrentState.isCarrierMerged) {
            if (mCurrentState.isDefault) {
            if (mCurrentState.isDefault || !mNetworkController.isRadioOn()) {
                notifyListenersForCarrierWifi(callback);
            }
        } else {
+15 −0
Original line number Diff line number Diff line
@@ -268,6 +268,21 @@ public class NetworkControllerWifiTest extends NetworkControllerBaseTest {
        }
    }

    @Test
    public void testDisableWiFiWithVcnWithUnderlyingWifi() {
        String testSsid = "Test VCN SSID";
        setWifiEnabled(true);
        verifyLastWifiIcon(false, WifiIcons.WIFI_NO_NETWORK);

        mNetworkController.setNoNetworksAvailable(false);
        setWifiStateForVcn(true, testSsid);
        setWifiLevelForVcn(1);
        verifyLastMobileDataIndicatorsForVcn(true, 1, TelephonyIcons.ICON_CWF, false);

        setWifiEnabled(false);
        verifyLastMobileDataIndicatorsForVcn(false, 1, 0, false);
    }

    @Test
    public void testCallStrengh() {
        if (true) return;