Merge "Add adb shell telecom get-system-dialer" into mnc-dev
diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
index cdf7429..c7ab36c 100644
--- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java
+++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
@@ -46,6 +46,7 @@
     private static final String COMMAND_UNREGISTER_PHONE_ACCOUNT = "unregister-phone-account";
     private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer";
     private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer";
+    private static final String COMMAND_GET_SYSTEM_DIALER = "get-system-dialer";
 
     private ComponentName mComponent;
     private String mAccountId;
@@ -60,7 +61,8 @@
                 "usage: telecom register-phone-account <COMPONENT> <ID> <LABEL>\n" +
                 "usage: telecom unregister-phone-account <COMPONENT> <ID>\n" +
                 "usage: telecom set-default-dialer <PACKAGE>\n" +
-                "usage: telecom get-default-dialer <PACKAGE>\n" +
+                "usage: telecom get-default-dialer\n" +
+                "usage: telecom get-system-dialer\n" +
                 "\n" +
                 "telecom set-phone-account-enabled: Enables the given phone account, if it has \n" +
                 " already been registered with Telecom.\n" +
@@ -70,7 +72,9 @@
                 "\n" +
                 "telecom set-default-dialer: Sets the default dialer to the given component. \n" +
                 "\n" +
-                "telecom get-default-dialer: Displays the current default dialer. \n"
+                "telecom get-default-dialer: Displays the current default dialer. \n" +
+                "\n" +
+                "telecom get-system-dialer: Displays the current system dialer. \n"
                 );
     }
 
@@ -103,6 +107,9 @@
             case COMMAND_GET_DEFAULT_DIALER:
                 runGetDefaultDialer();
                 break;
+            case COMMAND_GET_SYSTEM_DIALER:
+                runGetSystemDialer();
+                break;
             default:
                 throw new IllegalArgumentException ("unknown command '" + command + "'");
         }
@@ -148,6 +155,10 @@
         System.out.println(mTelecomService.getDefaultDialerPackage());
     }
 
+    private void runGetSystemDialer() throws RemoteException {
+        System.out.println(mTelecomService.getSystemDialerPackage());
+    }
+
     private PhoneAccountHandle getPhoneAccountHandleFromArgs() {
         final ComponentName component = parseComponentName(nextArgRequired());
         final String accountId = nextArgRequired();