summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2013-04-24 15:44:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-24 15:44:08 +0000
commite148a49d9214724c7c6aa5b23eae7cdbb80da1ca (patch)
tree80b134c1dfde722971ed112eb7f76ef52893c16b /services/java/com/android/server/ConnectivityService.java
parenta3b5bae9cf9e28e5d461c543e9c3fc7920a2330c (diff)
parent51f456f553248e910a7efc7eafa64f5ecf0f6cdc (diff)
Merge "Support WiFi only device at runtime." into jb-mr2-dev
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index c2f4a2c12cf7..3e19094bba71 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -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);