Merge "Support "dumpsys connectivity tethering""
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index da9c966..2435c27 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -185,6 +185,7 @@
public static final String DIAG_ARG = "--diag";
public static final String SHORT_ARG = "--short";
+ public static final String TETHERING_ARG = "tethering";
private static final boolean DBG = true;
private static final boolean VDBG = false;
@@ -1936,7 +1937,7 @@
private boolean argsContain(String[] args, String target) {
for (String arg : args) {
- if (arg.equals(target)) return true;
+ if (target.equals(arg)) return true;
}
return false;
}
@@ -1974,6 +1975,9 @@
if (argsContain(args, DIAG_ARG)) {
dumpNetworkDiagnostics(pw);
return;
+ } else if (argsContain(args, TETHERING_ARG)) {
+ mTethering.dump(fd, pw, args);
+ return;
}
pw.print("NetworkFactories for:");
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 0e2bc83..8088554 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -1685,6 +1685,7 @@
pw.println(" - lastError = " + tetherState.lastError);
}
pw.println("Upstream wanted: " + upstreamWanted());
+ pw.println("Current upstream interface: " + mCurrentUpstreamIface);
pw.decreaseIndent();
}
@@ -1702,7 +1703,7 @@
private static boolean argsContain(String[] args, String target) {
for (String arg : args) {
- if (arg.equals(target)) return true;
+ if (target.equals(arg)) return true;
}
return false;
}