summaryrefslogtreecommitdiffstats
path: root/apps/Development/src/com/android/development
diff options
context:
space:
mode:
authorSreeram Ramachandran <sreeram@google.com>2014-04-15 19:04:19 -0700
committerLorenzo Colitti <lorenzo@google.com>2014-05-14 12:26:23 +0000
commitb24ff8773d43aaaadaa7a2662c04563bb5e96a1d (patch)
treed92a420221678e064835f910da6383ff7889b351 /apps/Development/src/com/android/development
parentf98bce8f5870e94d9be50c2569deecddec174559 (diff)
downloadandroid_development-b24ff8773d43aaaadaa7a2662c04563bb5e96a1d.tar.gz
android_development-b24ff8773d43aaaadaa7a2662c04563bb5e96a1d.tar.bz2
android_development-b24ff8773d43aaaadaa7a2662c04563bb5e96a1d.zip
Update the Dev Tools app to the new route add/remove API.
Cherry-pick of: https://googleplex-android-review.git.corp.google.com/#/c/450447/ Change-Id: I629123567c907f0979e44998ef8d828b47059ec0
Diffstat (limited to 'apps/Development/src/com/android/development')
-rw-r--r--apps/Development/src/com/android/development/Connectivity.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/Development/src/com/android/development/Connectivity.java b/apps/Development/src/com/android/development/Connectivity.java
index 7d4491b4f..55e53500c 100644
--- a/apps/Development/src/com/android/development/Connectivity.java
+++ b/apps/Development/src/com/android/development/Connectivity.java
@@ -524,7 +524,8 @@ public class Connectivity extends Activity {
private void onAddDefaultRoute() {
try {
- mNetd.addRoute("eth0", new RouteInfo(null,
+ int netId = Integer.valueOf(((TextView) findViewById(R.id.netid)).getText().toString());
+ mNetd.addRoute(netId, new RouteInfo(null,
NetworkUtils.numericToInetAddress("8.8.8.8")));
} catch (Exception e) {
Log.e(TAG, "onAddDefaultRoute got exception: " + e.toString());
@@ -533,7 +534,8 @@ public class Connectivity extends Activity {
private void onRemoveDefaultRoute() {
try {
- mNetd.removeRoute("eth0", new RouteInfo(null,
+ int netId = Integer.valueOf(((TextView) findViewById(R.id.netid)).getText().toString());
+ mNetd.removeRoute(netId, new RouteInfo(null,
NetworkUtils.numericToInetAddress("8.8.8.8")));
} catch (Exception e) {
Log.e(TAG, "onRemoveDefaultRoute got exception: " + e.toString());