Merge "Escape arguments before passing to netd."
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 2b0d824..29e4c43 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -1471,9 +1471,7 @@
     public void setDnsInterfaceForPid(String iface, int pid) throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
         try {
-            String cmd = "resolver setifaceforpid " + iface + " " + pid;
-
-            mConnector.execute(cmd);
+            mConnector.execute("resolver", "setifaceforpid", iface, pid);
         } catch (NativeDaemonConnectorException e) {
             throw new IllegalStateException(
                     "Error communicating with native deamon to set interface for pid" + iface, e);
@@ -1484,9 +1482,7 @@
     public void clearDnsInterfaceForPid(int pid) throws IllegalStateException {
         mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
         try {
-            String cmd = "resolver clearifaceforpid " + pid;
-
-            mConnector.execute(cmd);
+            mConnector.execute("resolver", "clearifaceforpid", pid);
         } catch (NativeDaemonConnectorException e) {
             throw new IllegalStateException(
                     "Error communicating with native deamon to clear interface for pid " + pid, e);