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

Commit ca93c1e4 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "resolved conflicts for merge of cfeaa492 to master"

parents a6cbf50c fab33764
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.provider.Settings;
import android.provider.Telephony;
import android.telephony.PhoneStateListener;
@@ -92,7 +93,7 @@ public class NetworkController extends BroadcastReceiver {
    boolean mWifiEnabled, mWifiConnected;
    int mWifiLevel;
    String mWifiSsid;
    int mWifiIconId;
    int mWifiIconId = 0;

    // bluetooth
    private boolean mBluetoothTethered = false;
@@ -130,6 +131,9 @@ public class NetworkController extends BroadcastReceiver {
    public NetworkController(Context context) {
        mContext = context;

        // set up the default wifi icon, used when no radios have ever appeared
        updateWifiIcons();

        // telephony
        mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
        mPhone.listen(mPhoneStateListener,
@@ -272,6 +276,10 @@ public class NetworkController extends BroadcastReceiver {
            }
            mDataState = state;
            mDataNetType = networkType;
            if (state < 0) {
                // device without a data connection
                mSignalStrength = null;
            }
            updateDataNetType();
            updateDataIcon();
            refreshViews();
@@ -330,6 +338,11 @@ public class NetworkController extends BroadcastReceiver {
        }
    }

    private boolean hasMobileDataFeature() {
        // XXX: HAX: replace when a more reliable method is available
        return (! "wifi-only".equals(SystemProperties.get("ro.carrier")));
    }

    private final void updateTelephonySignalStrength() {
        // Display signal strength while in "emergency calls only" mode
        if (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly())) {
@@ -708,11 +721,13 @@ public class NetworkController extends BroadcastReceiver {
            dataTypeIconId = 0;
        } else {
            label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
            combinedSignalIconId = mDataSignalIconId;
            // On devices without mobile radios, we want to show the wifi icon
            combinedSignalIconId =
                hasMobileDataFeature() ? mDataSignalIconId : mWifiIconId;
            dataTypeIconId = 0;
        }

        if (false) {
        if (DEBUG) {
            Slog.d(TAG, "refreshViews combinedSignalIconId=0x"
                    + Integer.toHexString(combinedSignalIconId)
                    + "/" + getResourceName(combinedSignalIconId)
+4 −2
Original line number Diff line number Diff line
@@ -20,11 +20,13 @@ import com.android.systemui.R;

class WifiIcons {
    static final int[][] WIFI_SIGNAL_STRENGTH = {
            { R.drawable.stat_sys_wifi_signal_1,
            { R.drawable.stat_sys_wifi_signal_0,
              R.drawable.stat_sys_wifi_signal_1,
              R.drawable.stat_sys_wifi_signal_2,
              R.drawable.stat_sys_wifi_signal_3,
              R.drawable.stat_sys_wifi_signal_4 },
            { R.drawable.stat_sys_wifi_signal_1_fully,
            { R.drawable.stat_sys_wifi_signal_0,
              R.drawable.stat_sys_wifi_signal_1_fully,
              R.drawable.stat_sys_wifi_signal_2_fully,
              R.drawable.stat_sys_wifi_signal_3_fully,
              R.drawable.stat_sys_wifi_signal_4_fully }