Support "dumpsys connectivity tethering"
Also print current upstream interface in tethering dump output.
Test: as follows
- build
- flashed
- booted
- runtest frameworks-net passes
- "dumpsys connectivity tethering" shows just tethering info
Bug: 32163131
Bug: 36504926
Bug: 36988090
Bug: 38152109
Bug: 38186915
Bug: 38218697
Change-Id: I7f185fd71946a032e7f815207016294892df135d
This commit is contained in:
@@ -185,6 +185,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
|
|
||||||
public static final String DIAG_ARG = "--diag";
|
public static final String DIAG_ARG = "--diag";
|
||||||
public static final String SHORT_ARG = "--short";
|
public static final String SHORT_ARG = "--short";
|
||||||
|
public static final String TETHERING_ARG = "tethering";
|
||||||
|
|
||||||
private static final boolean DBG = true;
|
private static final boolean DBG = true;
|
||||||
private static final boolean VDBG = false;
|
private static final boolean VDBG = false;
|
||||||
@@ -1929,7 +1930,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
|
|
||||||
private boolean argsContain(String[] args, String target) {
|
private boolean argsContain(String[] args, String target) {
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
if (arg.equals(target)) return true;
|
if (target.equals(arg)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1967,6 +1968,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
if (argsContain(args, DIAG_ARG)) {
|
if (argsContain(args, DIAG_ARG)) {
|
||||||
dumpNetworkDiagnostics(pw);
|
dumpNetworkDiagnostics(pw);
|
||||||
return;
|
return;
|
||||||
|
} else if (argsContain(args, TETHERING_ARG)) {
|
||||||
|
mTethering.dump(fd, pw, args);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pw.print("NetworkFactories for:");
|
pw.print("NetworkFactories for:");
|
||||||
|
|||||||
Reference in New Issue
Block a user