diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 1697d38..85fe91d 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -109,6 +109,7 @@
     private final InCallController mInCallController;
     private final CallAudioManager mCallAudioManager;
     private final Ringer mRinger;
+    private final InCallWakeLockController mInCallWakeLockController;
     // For this set initial table size to 16 because we add 13 listeners in
     // the CallsManager constructor.
     private final Set<CallsManagerListener> mListeners = Collections.newSetFromMap(
@@ -171,6 +172,7 @@
         mDtmfLocalTonePlayer = new DtmfLocalTonePlayer(context);
         mConnectionServiceRepository = new ConnectionServiceRepository(mPhoneAccountRegistrar,
                 context);
+        mInCallWakeLockController = new InCallWakeLockController(context, this);
 
         mListeners.add(statusBarNotifier);
         mListeners.add(mCallLogManager);
diff --git a/src/com/android/server/telecom/InCallWakeLockController.java b/src/com/android/server/telecom/InCallWakeLockController.java
new file mode 100644
index 0000000..d97e171
--- /dev/null
+++ b/src/com/android/server/telecom/InCallWakeLockController.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2014 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.server.telecom;
+
+import android.content.Context;
+import android.os.PowerManager;
+import android.telecom.CallState;
+
+/**
+ * Handles acquisition and release of wake locks relating to call state.
+ */
+class InCallWakeLockController extends CallsManagerListenerBase {
+
+    private static final String TAG = "InCallWakeLockContoller";
+
+    private final Context mContext;
+    private final PowerManager.WakeLock mFullWakeLock;
+    private final CallsManager mCallsManager;
+
+    InCallWakeLockController(Context context, CallsManager callsManager) {
+        mContext = context;
+        mCallsManager = callsManager;
+
+        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+        mFullWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG);
+
+        callsManager.addListener(this);
+    }
+
+    @Override
+    public void onCallAdded(Call call) {
+        handleWakeLock();
+    }
+
+    @Override
+    public void onCallRemoved(Call call) {
+        handleWakeLock();
+    }
+
+    @Override
+    public void onCallStateChanged(Call call, int oldState, int newState) {
+        handleWakeLock();
+    }
+
+    private void handleWakeLock() {
+        // We grab a full lock as long as there exists a ringing call.
+        Call ringingCall = mCallsManager.getRingingCall();
+        if (ringingCall != null) {
+            mFullWakeLock.acquire();
+            Log.i(this, "Acquiring full wake lock");
+        } else if (mFullWakeLock.isHeld()) {
+            mFullWakeLock.release();
+            Log.i(this, "Releasing full wake lock");
+        }
+    }
+}
diff --git a/tests/Android.mk b/tests/Android.mk
index b122183..f293b80 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -20,6 +20,7 @@
 LOCAL_STATIC_JAVA_LIBRARIES := \
         android-ex-camera2 \
         guava \
+        mockito-target \
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
diff --git a/tests/src/com/android/server/telecom/tests/unit/InCallWakeLockControllerTest.java b/tests/src/com/android/server/telecom/tests/unit/InCallWakeLockControllerTest.java
new file mode 100644
index 0000000..5af9440
--- /dev/null
+++ b/tests/src/com/android/server/telecom/tests/unit/InCallWakeLockControllerTest.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2014 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.server.telecom;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.never;
+
+import android.content.Context;
+import android.os.PowerManager;
+import android.telecom.CallState;
+import android.test.AndroidTestCase;
+
+import com.android.server.telecom.Call;
+import com.android.server.telecom.CallsManager;
+import com.android.server.telecom.InCallWakeLockController;
+
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+public class InCallWakeLockControllerTest extends AndroidTestCase {
+
+    @Mock Context mContext;
+    @Mock PowerManager mPowerManager;
+    @Mock PowerManager.WakeLock mWakeLock;
+    @Mock CallsManager mCallsManager;
+    @Mock Call mCall;
+
+    private InCallWakeLockController mInCallWakeLockController;
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        MockitoAnnotations.initMocks(this);
+
+        when(mContext.getSystemService(Context.POWER_SERVICE)).thenReturn(mPowerManager);
+        when(mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "InCallWakeLockController"))
+                .thenReturn(mWakeLock);
+        mInCallWakeLockController = new InCallWakeLockController(mContext, mCallsManager);
+    }
+
+    @Override
+    public void tearDown() {
+    }
+
+    public void test_RingingCallAdded() throws Exception {
+        when(mCallsManager.getRingingCall()).thenReturn(mCall);
+        mInCallWakeLockController.onCallAdded(mCall);
+        verify(mWakeLock).acquire();
+    }
+
+    public void test_NonRingingCallAdded() throws Exception {
+        when(mCallsManager.getRingingCall()).thenReturn(null);
+        when(mWakeLock.isHeld()).thenReturn(false);
+
+        mInCallWakeLockController.onCallAdded(mCall);
+        verify(mWakeLock, never()).acquire();
+    }
+
+    public void test_RingingCallTransition() throws Exception {
+        when(mCallsManager.getRingingCall()).thenReturn(mCall);
+        mInCallWakeLockController.onCallStateChanged(mCall, CallState.NEW, CallState.RINGING);
+        verify(mWakeLock).acquire();
+    }
+
+    public void test_RingingCallRemoved() throws Exception {
+        when(mCallsManager.getRingingCall()).thenReturn(null);
+        when(mWakeLock.isHeld()).thenReturn(false);
+
+        mInCallWakeLockController.onCallRemoved(mCall);
+        verify(mWakeLock, never()).acquire();
+    }
+
+    public void test_WakeLockReleased() throws Exception {
+        when(mCallsManager.getRingingCall()).thenReturn(null);
+        when(mWakeLock.isHeld()).thenReturn(true);
+
+        mInCallWakeLockController.onCallRemoved(mCall);
+        verify(mWakeLock).release();
+    }
+}
