diff --git a/src/com/android/server/telecom/CallAudioManager.java b/src/com/android/server/telecom/CallAudioManager.java
index d8ebbc9..1b56e97 100644
--- a/src/com/android/server/telecom/CallAudioManager.java
+++ b/src/com/android/server/telecom/CallAudioManager.java
@@ -19,7 +19,7 @@
 import android.content.Context;
 import android.media.AudioManager;
 import android.os.Binder;
-import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.Preconditions;
@@ -40,7 +40,7 @@
     private final DockManager mDockManager;
     private final CallsManager mCallsManager;
 
-    private AudioState mAudioState;
+    private CallAudioState mCallAudioState;
     private int mAudioFocusStreamType;
     private boolean mIsRinging;
     private boolean mIsTonePlaying;
@@ -68,8 +68,8 @@
         mAudioFocusStreamType = STREAM_NONE;
     }
 
-    AudioState getAudioState() {
-        return mAudioState;
+    CallAudioState getCallAudioState() {
+        return mCallAudioState;
     }
 
     @Override
@@ -79,8 +79,8 @@
         if (hasFocus() && getForegroundCall() == call) {
             if (!call.isIncoming()) {
                 // Unmute new outgoing call.
-                setSystemAudioState(false, mAudioState.getRoute(),
-                        mAudioState.getSupportedRouteMask());
+                setSystemAudioState(false, mCallAudioState.getRoute(),
+                        mCallAudioState.getSupportedRouteMask());
             }
         }
     }
@@ -105,7 +105,7 @@
 
     @Override
     public void onIncomingCallAnswered(Call call) {
-        int route = mAudioState.getRoute();
+        int route = mCallAudioState.getRoute();
 
         // We do two things:
         // (1) If this is the first call, then we can to turn on bluetooth if available.
@@ -113,10 +113,10 @@
         boolean isOnlyCall = mCallsManager.getCalls().size() == 1;
         if (isOnlyCall && mBluetoothManager.isBluetoothAvailable()) {
             mBluetoothManager.connectBluetoothAudio();
-            route = AudioState.ROUTE_BLUETOOTH;
+            route = CallAudioState.ROUTE_BLUETOOTH;
         }
 
-        setSystemAudioState(false /* isMute */, route, mAudioState.getSupportedRouteMask());
+        setSystemAudioState(false /* isMute */, route, mCallAudioState.getSupportedRouteMask());
 
         if (call.can(android.telecom.Call.Details.CAPABILITY_SPEED_UP_MT_AUDIO)) {
             Log.v(this, "Speed up audio setup for IMS MT call.");
@@ -148,11 +148,12 @@
             return;
         }
 
-        boolean isCurrentlyWiredHeadset = mAudioState.getRoute() == AudioState.ROUTE_WIRED_HEADSET;
+        boolean isCurrentlyWiredHeadset = mCallAudioState.getRoute()
+                == CallAudioState.ROUTE_WIRED_HEADSET;
 
-        int newRoute = mAudioState.getRoute();  // start out with existing route
+        int newRoute = mCallAudioState.getRoute();  // start out with existing route
         if (newIsPluggedIn) {
-            newRoute = AudioState.ROUTE_WIRED_HEADSET;
+            newRoute = CallAudioState.ROUTE_WIRED_HEADSET;
         } else if (isCurrentlyWiredHeadset) {
             Call call = getForegroundCall();
             boolean hasLiveCall = call != null && call.isAlive();
@@ -160,9 +161,9 @@
             if (hasLiveCall) {
                 // In order of preference when a wireless headset is unplugged.
                 if (mWasSpeakerOn) {
-                    newRoute = AudioState.ROUTE_SPEAKER;
+                    newRoute = CallAudioState.ROUTE_SPEAKER;
                 } else {
-                    newRoute = AudioState.ROUTE_EARPIECE;
+                    newRoute = CallAudioState.ROUTE_EARPIECE;
                 }
 
                 // We don't automatically connect to bluetooth when user unplugs their wired headset
@@ -177,7 +178,7 @@
 
         // We need to call this every time even if we do not change the route because the supported
         // routes changed either to include or not include WIRED_HEADSET.
-        setSystemAudioState(mAudioState.isMuted(), newRoute, calculateSupportedRoutes());
+        setSystemAudioState(mCallAudioState.isMuted(), newRoute, calculateSupportedRoutes());
     }
 
     @Override
@@ -190,19 +191,19 @@
         if (isDocked) {
             // Device just docked, turn to speakerphone. Only do so if the route is currently
             // earpiece so that we dont switch out of a BT headset or a wired headset.
-            if (mAudioState.getRoute() == AudioState.ROUTE_EARPIECE) {
-                setAudioRoute(AudioState.ROUTE_SPEAKER);
+            if (mCallAudioState.getRoute() == CallAudioState.ROUTE_EARPIECE) {
+                setAudioRoute(CallAudioState.ROUTE_SPEAKER);
             }
         } else {
             // Device just undocked, remove from speakerphone if possible.
-            if (mAudioState.getRoute() == AudioState.ROUTE_SPEAKER) {
-                setAudioRoute(AudioState.ROUTE_WIRED_OR_EARPIECE);
+            if (mCallAudioState.getRoute() == CallAudioState.ROUTE_SPEAKER) {
+                setAudioRoute(CallAudioState.ROUTE_WIRED_OR_EARPIECE);
             }
         }
     }
 
     void toggleMute() {
-        mute(!mAudioState.isMuted());
+        mute(!mCallAudioState.isMuted());
     }
 
     void mute(boolean shouldMute) {
@@ -218,16 +219,16 @@
             Log.v(this, "ignoring mute for emergency call");
         }
 
-        if (mAudioState.isMuted() != shouldMute) {
-            setSystemAudioState(shouldMute, mAudioState.getRoute(),
-                    mAudioState.getSupportedRouteMask());
+        if (mCallAudioState.isMuted() != shouldMute) {
+            setSystemAudioState(shouldMute, mCallAudioState.getRoute(),
+                    mCallAudioState.getSupportedRouteMask());
         }
     }
 
     /**
      * Changed the audio route, for example from earpiece to speaker phone.
      *
-     * @param route The new audio route to use. See {@link AudioState}.
+     * @param route The new audio route to use. See {@link CallAudioState}.
      */
     void setAudioRoute(int route) {
         // This can happen even when there are no calls and we don't have focus.
@@ -235,23 +236,23 @@
             return;
         }
 
-        Log.v(this, "setAudioRoute, route: %s", AudioState.audioRouteToString(route));
+        Log.v(this, "setAudioRoute, route: %s", CallAudioState.audioRouteToString(route));
 
         // Change ROUTE_WIRED_OR_EARPIECE to a single entry.
-        int newRoute = selectWiredOrEarpiece(route, mAudioState.getSupportedRouteMask());
+        int newRoute = selectWiredOrEarpiece(route, mCallAudioState.getSupportedRouteMask());
 
         // If route is unsupported, do nothing.
-        if ((mAudioState.getSupportedRouteMask() | newRoute) == 0) {
+        if ((mCallAudioState.getSupportedRouteMask() | newRoute) == 0) {
             Log.wtf(this, "Asking to set to a route that is unsupported: %d", newRoute);
             return;
         }
 
-        if (mAudioState.getRoute() != newRoute) {
+        if (mCallAudioState.getRoute() != newRoute) {
             // Remember the new speaker state so it can be restored when the user plugs and unplugs
             // a headset.
-            mWasSpeakerOn = newRoute == AudioState.ROUTE_SPEAKER;
-            setSystemAudioState(mAudioState.isMuted(), newRoute,
-                    mAudioState.getSupportedRouteMask());
+            mWasSpeakerOn = newRoute == CallAudioState.ROUTE_SPEAKER;
+            setSystemAudioState(mCallAudioState.isMuted(), newRoute,
+                    mCallAudioState.getSupportedRouteMask());
         }
     }
 
@@ -288,16 +289,17 @@
         }
 
         int supportedRoutes = calculateSupportedRoutes();
-        int newRoute = mAudioState.getRoute();
+        int newRoute = mCallAudioState.getRoute();
         if (bluetoothManager.isBluetoothAudioConnectedOrPending()) {
-            newRoute = AudioState.ROUTE_BLUETOOTH;
-        } else if (mAudioState.getRoute() == AudioState.ROUTE_BLUETOOTH) {
-            newRoute = selectWiredOrEarpiece(AudioState.ROUTE_WIRED_OR_EARPIECE, supportedRoutes);
+            newRoute = CallAudioState.ROUTE_BLUETOOTH;
+        } else if (mCallAudioState.getRoute() == CallAudioState.ROUTE_BLUETOOTH) {
+            newRoute = selectWiredOrEarpiece(CallAudioState.ROUTE_WIRED_OR_EARPIECE,
+                    supportedRoutes);
             // Do not switch to speaker when bluetooth disconnects.
             mWasSpeakerOn = false;
         }
 
-        setSystemAudioState(mAudioState.isMuted(), newRoute, supportedRoutes);
+        setSystemAudioState(mCallAudioState.isMuted(), newRoute, supportedRoutes);
     }
 
     boolean isBluetoothAudioOn() {
@@ -308,10 +310,11 @@
         return mBluetoothManager.isBluetoothAvailable();
     }
 
-    private void saveAudioState(AudioState audioState) {
-        mAudioState = audioState;
-        mStatusBarNotifier.notifyMute(mAudioState.isMuted());
-        mStatusBarNotifier.notifySpeakerphone(mAudioState.getRoute() == AudioState.ROUTE_SPEAKER);
+    private void saveAudioState(CallAudioState callAudioState) {
+        mCallAudioState = callAudioState;
+        mStatusBarNotifier.notifyMute(mCallAudioState.isMuted());
+        mStatusBarNotifier.notifySpeakerphone(mCallAudioState.getRoute()
+                == CallAudioState.ROUTE_SPEAKER);
     }
 
     private void onCallUpdated(Call call) {
@@ -338,35 +341,34 @@
             return;
         }
 
-        AudioState oldAudioState = mAudioState;
-        saveAudioState(new AudioState(isMuted, route, supportedRouteMask));
-        if (!force && Objects.equals(oldAudioState, mAudioState)) {
+        CallAudioState oldAudioState = mCallAudioState;
+        saveAudioState(new CallAudioState(isMuted, route, supportedRouteMask));
+        if (!force && Objects.equals(oldAudioState, mCallAudioState)) {
             return;
         }
-        Log.i(this, "changing audio state from %s to %s", oldAudioState, mAudioState);
+        Log.i(this, "changing audio state from %s to %s", oldAudioState, mCallAudioState);
 
         // Mute.
-        if (mAudioState.isMuted() != mAudioManager.isMicrophoneMute()) {
-            Log.i(this, "changing microphone mute state to: %b", mAudioState.isMuted());
-            mAudioManager.setMicrophoneMute(mAudioState.isMuted());
+        if (mCallAudioState.isMuted() != mAudioManager.isMicrophoneMute()) {
+            Log.i(this, "changing microphone mute state to: %b", mCallAudioState.isMuted());
+            mAudioManager.setMicrophoneMute(mCallAudioState.isMuted());
         }
 
         // Audio route.
-        if (mAudioState.getRoute() == AudioState.ROUTE_BLUETOOTH) {
+        if (mCallAudioState.getRoute() == CallAudioState.ROUTE_BLUETOOTH) {
             turnOnSpeaker(false);
             turnOnBluetooth(true);
-        } else if (mAudioState.getRoute() == AudioState.ROUTE_SPEAKER) {
+        } else if (mCallAudioState.getRoute() == CallAudioState.ROUTE_SPEAKER) {
             turnOnBluetooth(false);
             turnOnSpeaker(true);
-        } else if (mAudioState.getRoute() == AudioState.ROUTE_EARPIECE ||
-                mAudioState.getRoute() == AudioState.ROUTE_WIRED_HEADSET) {
+        } else if (mCallAudioState.getRoute() == CallAudioState.ROUTE_EARPIECE ||
+                mCallAudioState.getRoute() == CallAudioState.ROUTE_WIRED_HEADSET) {
             turnOnBluetooth(false);
             turnOnSpeaker(false);
         }
 
-        if (!oldAudioState.equals(mAudioState)) {
-            mCallsManager
-                    .onAudioStateChanged(oldAudioState, mAudioState);
+        if (!oldAudioState.equals(mCallAudioState)) {
+            mCallsManager.onCallAudioStateChanged(oldAudioState, mCallAudioState);
             updateAudioForForegroundCall();
         }
     }
@@ -490,37 +492,37 @@
         // Since they are mutually exclusive and one is ALWAYS valid, we allow a special input of
         // ROUTE_WIRED_OR_EARPIECE so that callers dont have to make a call to check which is
         // supported before calling setAudioRoute.
-        if (route == AudioState.ROUTE_WIRED_OR_EARPIECE) {
-            route = AudioState.ROUTE_WIRED_OR_EARPIECE & supportedRouteMask;
+        if (route == CallAudioState.ROUTE_WIRED_OR_EARPIECE) {
+            route = CallAudioState.ROUTE_WIRED_OR_EARPIECE & supportedRouteMask;
             if (route == 0) {
                 Log.wtf(this, "One of wired headset or earpiece should always be valid.");
                 // assume earpiece in this case.
-                route = AudioState.ROUTE_EARPIECE;
+                route = CallAudioState.ROUTE_EARPIECE;
             }
         }
         return route;
     }
 
     private int calculateSupportedRoutes() {
-        int routeMask = AudioState.ROUTE_SPEAKER;
+        int routeMask = CallAudioState.ROUTE_SPEAKER;
 
         if (mWiredHeadsetManager.isPluggedIn()) {
-            routeMask |= AudioState.ROUTE_WIRED_HEADSET;
+            routeMask |= CallAudioState.ROUTE_WIRED_HEADSET;
         } else {
-            routeMask |= AudioState.ROUTE_EARPIECE;
+            routeMask |= CallAudioState.ROUTE_EARPIECE;
         }
 
         if (mBluetoothManager.isBluetoothAvailable()) {
-            routeMask |=  AudioState.ROUTE_BLUETOOTH;
+            routeMask |=  CallAudioState.ROUTE_BLUETOOTH;
         }
 
         return routeMask;
     }
 
-    private AudioState getInitialAudioState(Call call) {
+    private CallAudioState getInitialAudioState(Call call) {
         int supportedRouteMask = calculateSupportedRoutes();
         int route = selectWiredOrEarpiece(
-                AudioState.ROUTE_WIRED_OR_EARPIECE, supportedRouteMask);
+                CallAudioState.ROUTE_WIRED_OR_EARPIECE, supportedRouteMask);
 
         // We want the UI to indicate that "bluetooth is in use" in two slightly different cases:
         // (a) The obvious case: if a bluetooth headset is currently in use for an ongoing call.
@@ -535,18 +537,18 @@
                 case CallState.DIALING:
                 case CallState.CONNECTING:
                 case CallState.RINGING:
-                    route = AudioState.ROUTE_BLUETOOTH;
+                    route = CallAudioState.ROUTE_BLUETOOTH;
                     break;
                 default:
                     break;
             }
         }
 
-        return new AudioState(false, route, supportedRouteMask);
+        return new CallAudioState(false, route, supportedRouteMask);
     }
 
     private void setInitialAudioState(Call call, boolean force) {
-        AudioState audioState = getInitialAudioState(call);
+        CallAudioState audioState = getInitialAudioState(call);
         Log.v(this, "setInitialAudioState %s, %s", audioState, call);
         setSystemAudioState(
                 force, audioState.isMuted(), audioState.getRoute(),
@@ -556,7 +558,7 @@
     private void updateAudioForForegroundCall() {
         Call call = mCallsManager.getForegroundCall();
         if (call != null && call.getConnectionService() != null) {
-            call.getConnectionService().onAudioStateChanged(call, mAudioState);
+            call.getConnectionService().onCallAudioStateChanged(call, mCallAudioState);
         }
     }
 
@@ -590,7 +592,7 @@
      * @param pw The {@code IndentingPrintWriter} to write the state to.
      */
     public void dump(IndentingPrintWriter pw) {
-        pw.println("mAudioState: " + mAudioState);
+        pw.println("mAudioState: " + mCallAudioState);
         pw.println("mBluetoothManager:");
         pw.increaseIndent();
         mBluetoothManager.dump(pw);
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index a638a3e..845fe7f 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -25,6 +25,7 @@
 import android.os.Trace;
 import android.provider.CallLog.Calls;
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 import android.telecom.Conference;
 import android.telecom.Connection;
 import android.telecom.DisconnectCause;
@@ -73,7 +74,7 @@
         void onIncomingCallAnswered(Call call);
         void onIncomingCallRejected(Call call, boolean rejectWithMessage, String textMessage);
         void onForegroundCallChanged(Call oldForegroundCall, Call newForegroundCall);
-        void onAudioStateChanged(AudioState oldAudioState, AudioState newAudioState);
+        void onCallAudioStateChanged(CallAudioState oldAudioState, CallAudioState newAudioState);
         void onRingbackRequested(Call call, boolean ringback);
         void onIsConferencedChanged(Call call);
         void onIsVoipAudioModeChanged(Call call);
@@ -406,8 +407,8 @@
         return false;
     }
 
-    AudioState getAudioState() {
-        return mCallAudioManager.getAudioState();
+    CallAudioState getAudioState() {
+        return mCallAudioManager.getCallAudioState();
     }
 
     boolean isTtySupported() {
@@ -891,10 +892,10 @@
     }
 
     /** Called when the audio state changes. */
-    void onAudioStateChanged(AudioState oldAudioState, AudioState newAudioState) {
+    void onCallAudioStateChanged(CallAudioState oldAudioState, CallAudioState newAudioState) {
         Log.v(this, "onAudioStateChanged, audioState: %s -> %s", oldAudioState, newAudioState);
         for (CallsManagerListener listener : mListeners) {
-            listener.onAudioStateChanged(oldAudioState, newAudioState);
+            listener.onCallAudioStateChanged(oldAudioState, newAudioState);
         }
     }
 
@@ -1450,7 +1451,7 @@
      */
     private void maybeMoveToSpeakerPhone(Call call) {
         if (call.getStartWithSpeakerphoneOn()) {
-            setAudioRoute(AudioState.ROUTE_SPEAKER);
+            setAudioRoute(CallAudioState.ROUTE_SPEAKER);
             call.setStartWithSpeakerphoneOn(false);
         }
     }
diff --git a/src/com/android/server/telecom/CallsManagerListenerBase.java b/src/com/android/server/telecom/CallsManagerListenerBase.java
index 6b54709..129f9ae 100644
--- a/src/com/android/server/telecom/CallsManagerListenerBase.java
+++ b/src/com/android/server/telecom/CallsManagerListenerBase.java
@@ -17,6 +17,7 @@
 package com.android.server.telecom;
 
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 
 /**
  * Provides a default implementation for listeners of CallsManager.
@@ -54,7 +55,8 @@
     }
 
     @Override
-    public void onAudioStateChanged(AudioState oldAudioState, AudioState newAudioState) {
+    public void onCallAudioStateChanged(CallAudioState oldAudioState,
+            CallAudioState newAudioState) {
     }
 
     @Override
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index 82b99cc..a6bac09 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -25,6 +25,7 @@
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 import android.telecom.Connection;
 import android.telecom.ConnectionRequest;
 import android.telecom.ConnectionService;
@@ -714,13 +715,13 @@
         }
     }
 
-    /** @see IConnectionService#onAudioStateChanged(String,AudioState) */
-    void onAudioStateChanged(Call activeCall, AudioState audioState) {
+    /** @see IConnectionService#onCallAudioStateChanged(String,CallAudioState) */
+    void onCallAudioStateChanged(Call activeCall, CallAudioState audioState) {
         final String callId = mCallIdMapper.getCallId(activeCall);
-        if (callId != null && isServiceValid("onAudioStateChanged")) {
+        if (callId != null && isServiceValid("onCallAudioStateChanged")) {
             try {
-                logOutgoing("onAudioStateChanged %s %s", callId, audioState);
-                mServiceInterface.onAudioStateChanged(callId, audioState);
+                logOutgoing("onCallAudioStateChanged %s %s", callId, audioState);
+                mServiceInterface.onCallAudioStateChanged(callId, audioState);
             } catch (RemoteException e) {
             }
         }
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index 0855659..ebbc673 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -31,6 +31,7 @@
 import android.os.Trace;
 import android.os.UserHandle;
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 import android.telecom.Connection;
 import android.telecom.DefaultDialerManager;
 import android.telecom.InCallService;
@@ -200,13 +201,14 @@
     }
 
     @Override
-    public void onAudioStateChanged(AudioState oldAudioState, AudioState newAudioState) {
+    public void onCallAudioStateChanged(CallAudioState oldCallAudioState,
+            CallAudioState newCallAudioState) {
         if (!mInCallServices.isEmpty()) {
-            Log.i(this, "Calling onAudioStateChanged, audioState: %s -> %s", oldAudioState,
-                    newAudioState);
+            Log.i(this, "Calling onAudioStateChanged, audioState: %s -> %s", oldCallAudioState,
+                    newCallAudioState);
             for (IInCallService inCallService : mInCallServices.values()) {
                 try {
-                    inCallService.onAudioStateChanged(newAudioState);
+                    inCallService.onCallAudioStateChanged(newCallAudioState);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -381,7 +383,7 @@
                 } catch (RemoteException ignored) {
                 }
             }
-            onAudioStateChanged(
+            onCallAudioStateChanged(
                     null,
                     mCallsManager.getAudioState());
             onCanAddCallChanged(mCallsManager.canAddCall());
diff --git a/testapps/src/com/android/server/telecom/testapps/TestConnectionManager.java b/testapps/src/com/android/server/telecom/testapps/TestConnectionManager.java
index a27be39..2982916 100644
--- a/testapps/src/com/android/server/telecom/testapps/TestConnectionManager.java
+++ b/testapps/src/com/android/server/telecom/testapps/TestConnectionManager.java
@@ -18,6 +18,7 @@
 
 import android.net.Uri;
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 import android.telecom.Conference;
 import android.telecom.Connection;
 import android.telecom.ConnectionRequest;
@@ -172,8 +173,8 @@
         }
 
         @Override
-        public void onAudioStateChanged(AudioState state) {
-            mRemote.setAudioState(state);
+        public void onCallAudioStateChanged(CallAudioState state) {
+            mRemote.setCallAudioState(state);
         }
 
         private void setState(int state) {
diff --git a/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java b/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
index b7682b4..72dae74 100644
--- a/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
+++ b/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
@@ -242,9 +242,6 @@
             setActive();
         }
 
-        @Override
-        public void onAudioStateChanged(AudioState state) { }
-
         public void setTestVideoCallProvider(TestVideoProvider testVideoCallProvider) {
             mTestVideoCallProvider = testVideoCallProvider;
         }
diff --git a/tests/src/com/android/server/telecom/tests/InCallServiceFixture.java b/tests/src/com/android/server/telecom/tests/InCallServiceFixture.java
index 3c4ff8d..2dd4b97 100644
--- a/tests/src/com/android/server/telecom/tests/InCallServiceFixture.java
+++ b/tests/src/com/android/server/telecom/tests/InCallServiceFixture.java
@@ -25,6 +25,7 @@
 import android.os.IInterface;
 import android.os.RemoteException;
 import android.telecom.AudioState;
+import android.telecom.CallAudioState;
 import android.telecom.ParcelableCall;
 
 import java.util.HashMap;
@@ -37,7 +38,7 @@
 
     public String mLatestCallId;
     public IInCallAdapter mInCallAdapter;
-    public AudioState mAudioState;
+    public CallAudioState mCallAudioState;
     public final Map<String, ParcelableCall> mCallById = new HashMap<>();
     public final Map<String, String> mPostDialById = new HashMap<>();
     public final Map<String, String> mPostDialWaitById = new HashMap<>();
@@ -88,8 +89,8 @@
         }
 
         @Override
-        public void onAudioStateChanged(AudioState audioState) throws RemoteException {
-            mAudioState = audioState;
+        public void onCallAudioStateChanged(CallAudioState audioState) throws RemoteException {
+            mCallAudioState = audioState;
         }
 
         @Override
