OSDN Git Service

Support triggering confirmConfiguration() via dumpsys
authorErik Kline <ek@google.com>
Wed, 28 Sep 2016 06:19:00 +0000 (15:19 +0900)
committerErik Kline <ek@google.com>
Wed, 28 Sep 2016 06:19:00 +0000 (15:19 +0900)
Tested:
  - flashed to device
  - triggered
  - monitored tcpdump for the expected traffic

Bug: 30869013
Change-Id: I6a4741bdeed2aaa483f8c2281acb74d245a323e8

services/net/java/android/net/ip/IpManager.java

index 215059d..ee67d95 100644 (file)
@@ -358,6 +358,7 @@ public class IpManager extends StateMachine {
     }
 
     public static final String DUMP_ARG = "ipmanager";
+    public static final String DUMP_ARG_CONFIRM = "confirm";
 
     private static final int CMD_STOP = 1;
     private static final int CMD_START = 2;
@@ -562,6 +563,12 @@ public class IpManager extends StateMachine {
     }
 
     public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+        if (args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) {
+            // Execute confirmConfiguration() and take no further action.
+            confirmConfiguration();
+            return;
+        }
+
         IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
         pw.println("APF dump:");
         pw.increaseIndent();