summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-05-14 12:46:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-14 12:46:07 +0000
commit07133093f01ea6da084018fe4f699930d43ff2ac (patch)
treea9d9e0618203e7539847337daf70aedf5233a4de
parent4a0e0173f4b718d63a729028fe75a98f3b0eeb77 (diff)
parent4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde (diff)
downloadframeworks_base-07133093f01ea6da084018fe4f699930d43ff2ac.zip
frameworks_base-07133093f01ea6da084018fe4f699930d43ff2ac.tar.gz
frameworks_base-07133093f01ea6da084018fe4f699930d43ff2ac.tar.bz2
Merge "Fix build."
-rw-r--r--services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
index b4a02f1..88aaafc 100644
--- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
@@ -163,9 +163,10 @@ public class ConnectivityServiceTest extends AndroidTestCase {
nextConnBroadcast.get();
// verify that both routes were added and DNS was flushed
- verify(mNetManager).addRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V4));
- verify(mNetManager).addRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V6));
- verify(mNetManager).flushNetworkDnsCache(mMobile.tracker.getNetwork().netId);
+ int mobileNetId = mMobile.tracker.getNetwork().netId;
+ verify(mNetManager).addRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V4));
+ verify(mNetManager).addRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V6));
+ verify(mNetManager).flushNetworkDnsCache(mobileNetId);
}
@@ -200,11 +201,14 @@ public class ConnectivityServiceTest extends AndroidTestCase {
nextConnBroadcast.get();
// verify that wifi routes added, and teardown requested
- verify(mNetManager).addRoute(eq(WIFI_IFACE), eq(WIFI_ROUTE_V4));
- verify(mNetManager).addRoute(eq(WIFI_IFACE), eq(WIFI_ROUTE_V6));
- verify(mNetManager).flushNetworkDnsCache(mWifi.tracker.getNetwork().netId);
+ int wifiNetId = mWifi.tracker.getNetwork().netId;
+ verify(mNetManager).addRoute(eq(wifiNetId), eq(WIFI_ROUTE_V4));
+ verify(mNetManager).addRoute(eq(wifiNetId), eq(WIFI_ROUTE_V6));
+ verify(mNetManager).flushNetworkDnsCache(wifiNetId);
verify(mMobile.tracker).teardown();
+ int mobileNetId = mMobile.tracker.getNetwork().netId;
+
reset(mNetManager, mMobile.tracker);
// tear down mobile network, as requested
@@ -216,8 +220,8 @@ public class ConnectivityServiceTest extends AndroidTestCase {
mTrackerHandler.obtainMessage(EVENT_STATE_CHANGED, mMobile.info).sendToTarget();
nextConnBroadcast.get();
- verify(mNetManager).removeRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V4));
- verify(mNetManager).removeRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V6));
+ verify(mNetManager).removeRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V4));
+ verify(mNetManager).removeRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V6));
}