Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cdcba7b authored by Erik Kline's avatar Erik Kline Committed by Gerrit Code Review
Browse files

Merge "Support "dumpsys connectivity tethering""

parents bf152b14 ee363c4e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ public class ConnectivityService extends IConnectivityManager.Stub

    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 @@ public class ConnectivityService extends IConnectivityManager.Stub

    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 @@ public class ConnectivityService extends IConnectivityManager.Stub
        if (argsContain(args, DIAG_ARG)) {
            dumpNetworkDiagnostics(pw);
            return;
        } else if (argsContain(args, TETHERING_ARG)) {
            mTethering.dump(fd, pw, args);
            return;
        }

        pw.print("NetworkFactories for:");
+2 −1
Original line number Diff line number Diff line
@@ -1685,6 +1685,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                pw.println(" - lastError = " + tetherState.lastError);
            }
            pw.println("Upstream wanted: " + upstreamWanted());
            pw.println("Current upstream interface: " + mCurrentUpstreamIface);
            pw.decreaseIndent();
        }

@@ -1702,7 +1703,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering

    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;
    }