diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2010-12-06 13:56:24 -0800 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2010-12-07 07:48:33 -0800 |
commit | da3d5e6587c1476d489495ac93e84ebf223024c9 (patch) | |
tree | bca7bbbb104dc88394cf8d17f95fdc4923aa007a /services | |
parent | c030a164c8a890947985d15722fe3df8785f7d04 (diff) | |
download | frameworks_base-da3d5e6587c1476d489495ac93e84ebf223024c9.zip frameworks_base-da3d5e6587c1476d489495ac93e84ebf223024c9.tar.gz frameworks_base-da3d5e6587c1476d489495ac93e84ebf223024c9.tar.bz2 |
Add a Dummy data connection for testing purposes.
Enable with:
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,1"</item>
<item>"dummy,7,7,0"</item>
</string-array>
in your config.xml
Change-Id: I3965edaeb4873e95131f4083b8d23d682ce17841
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index f1fce3e..758f9f3 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -24,6 +24,7 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.database.ContentObserver; import android.net.ConnectivityManager; +import android.net.DummyDataStateTracker; import android.net.IConnectivityManager; import android.net.MobileDataStateTracker; import android.net.NetworkInfo; @@ -411,6 +412,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { mNetTrackers[netType].teardown(); } break; + case ConnectivityManager.TYPE_DUMMY: + mNetTrackers[netType] = new DummyDataStateTracker(netType, + mNetAttributes[netType].mName); + mNetTrackers[netType].startMonitoring(context, mHandler); + break; default: loge("Trying to create a DataStateTracker for an unknown radio type " + mNetAttributes[netType].mRadio); |