Add hold command to CallCommandService.

Change-Id: I7c4e28e868dfb7b12fe0c8568ed12e3c85529cc1
diff --git a/common/src/com/android/services/telephony/common/ICallCommandService.aidl b/common/src/com/android/services/telephony/common/ICallCommandService.aidl
index 220b14c..8668216 100644
--- a/common/src/com/android/services/telephony/common/ICallCommandService.aidl
+++ b/common/src/com/android/services/telephony/common/ICallCommandService.aidl
@@ -40,6 +40,11 @@
     void disconnectCall(int callId);
 
     /**
+     * Place call on hold.
+     */
+    void hold(int callId, boolean hold);
+
+    /**
      * Mute the phone.
      */
     void mute(boolean onOff);
diff --git a/src/com/android/phone/CallCommandService.java b/src/com/android/phone/CallCommandService.java
index 6a0ef2f..ff12063 100644
--- a/src/com/android/phone/CallCommandService.java
+++ b/src/com/android/phone/CallCommandService.java
@@ -75,6 +75,16 @@
     }
 
     @Override
+    public void hold(int callId, boolean hold) {
+        try {
+            // TODO(klp): Change to use the callId/hold
+            PhoneUtils.switchHoldingAndActive(mCallManager.getFirstActiveBgCall());
+        } catch (Exception e) {
+            Log.e(TAG, "Error trying to place call on hold.", e);
+        }
+    }
+
+    @Override
     public void mute(boolean onOff) {
         try {
             PhoneUtils.setMute(onOff);