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

Commit e1933509 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am d2190a4b: am e148a49d: Merge "Support WiFi only device at runtime." into jb-mr2-dev

* commit 'd2190a4b':
  Support WiFi only device at runtime.
parents 69ca575b d2190a4b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -432,6 +432,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            mRadioAttributes[r.mType] = r;
        }

        // TODO: What is the "correct" way to do determine if this is a wifi only device?
        boolean wifiOnly = SystemProperties.getBoolean("ro.radio.noril", false);
        log("wifiOnly=" + wifiOnly);
        String[] naStrings = context.getResources().getStringArray(
                com.android.internal.R.array.networkAttributes);
        for (String naString : naStrings) {
@@ -442,6 +445,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                            n.type);
                    continue;
                }
                if (wifiOnly && ConnectivityManager.isNetworkTypeMobile(n.type)) {
                    log("networkAttributes - ignoring mobile as this dev is wifiOnly " +
                            n.type);
                    continue;
                }
                if (mNetConfigs[n.type] != null) {
                    loge("Error in networkAttributes - ignoring attempt to redefine type " +
                            n.type);