diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 1d0f395..933d758 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -33,7 +33,7 @@
 
     public void onAnswer() {
         // TODO(klp): hook in call id.
-        CallHandlerService.answerCall(1);
+        CallCommandService.getInstance().answerCall(1);
         mListener.onAnswered();
     }
 
diff --git a/InCallUI/src/com/android/incallui/CallCommandService.java b/InCallUI/src/com/android/incallui/CallCommandService.java
new file mode 100644
index 0000000..0264af1
--- /dev/null
+++ b/InCallUI/src/com/android/incallui/CallCommandService.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui;
+
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.internal.util.Preconditions;
+import com.android.services.telephony.common.ICallCommandService;
+
+/**
+ * Main interface for phone related commands.
+ */
+public class CallCommandService {
+
+    private static final String TAG = CallCommandService.class.getSimpleName();
+
+    private static CallCommandService sInstance;
+
+    public static CallCommandService getInstance() {
+        if (sInstance == null) {
+            throw new IllegalStateException("CallCommandService has not been initialized.");
+        }
+        return sInstance;
+    }
+
+    // TODO(klp): Not sure if static call is ok. Might need to switch to normal service binding.
+    public static void init(ICallCommandService service) {
+        Preconditions.checkState(sInstance == null);
+        sInstance = new CallCommandService(service);
+    }
+
+
+    private ICallCommandService mCommandService;
+
+    private CallCommandService(ICallCommandService service) {
+        mCommandService = service;
+    }
+
+    public void answerCall(int callId) {
+        try {
+            mCommandService.answerCall(callId);
+        } catch (RemoteException e) {
+            Log.e(TAG, "answerCall : " + e);
+        }
+    }
+
+    public void mute() {
+
+    }
+
+    public void turnSpeakerOn() {
+
+    }
+}
diff --git a/InCallUI/src/com/android/incallui/CallHandlerService.java b/InCallUI/src/com/android/incallui/CallHandlerService.java
index b5f1497..490adc0 100644
--- a/InCallUI/src/com/android/incallui/CallHandlerService.java
+++ b/InCallUI/src/com/android/incallui/CallHandlerService.java
@@ -34,8 +34,6 @@
     private static final String TAG = CallHandlerService.class.getSimpleName();
     private static final boolean DBG = false; // TODO: Have a shared location for this.
 
-    private static ICallCommandService mCallCommandService;
-
     @Override
     public void onCreate() {
         super.onCreate();
@@ -55,7 +53,7 @@
         @Override
         public void setCallCommandService(ICallCommandService service) {
             logD("onConnected: " + service.toString());
-            mCallCommandService = service;
+            CallCommandService.init(service);
         }
 
         @Override
@@ -66,20 +64,6 @@
         }
     };
 
-    // TODO(klp): Not sure if static call is ok. Might need to switch to normal service binding.
-    public static void answerCall(int callId) {
-        //Preconditions.checkState(mCallCommandService != null);
-        // TODO(klp): enable fail fast later.
-        if (mCallCommandService == null) {
-            return;
-        }
-        try {
-            mCallCommandService.answerCall(callId);
-        } catch (RemoteException e) {
-            Log.e(TAG, "answerCall : " + e);
-        }
-    }
-
     private void logD(String message) {
         if (DBG) {
             Log.d(TAG, message);
