From a7086bc66eca9bbae80fb40ec532b3253361ee53 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Thu, 3 Dec 2015 13:51:10 -0800 Subject: Updating InCallUI to use CallAudioStateCompat Bug: 25776171 Change-Id: I94b42eb188e457a5470e33642cab2517949a8153 --- .../src/com/android/incallui/AudioModeProvider.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'InCallUI/src/com/android/incallui/AudioModeProvider.java') diff --git a/InCallUI/src/com/android/incallui/AudioModeProvider.java b/InCallUI/src/com/android/incallui/AudioModeProvider.java index e7ffecca7..961fb11ff 100644 --- a/InCallUI/src/com/android/incallui/AudioModeProvider.java +++ b/InCallUI/src/com/android/incallui/AudioModeProvider.java @@ -16,10 +16,10 @@ package com.android.incallui; -import android.telecom.CallAudioState; - import com.google.common.collect.Lists; +import com.android.dialer.compat.CallAudioStateCompat; + import java.util.List; /** @@ -30,19 +30,20 @@ public class AudioModeProvider { static final int AUDIO_MODE_INVALID = 0; private static AudioModeProvider sAudioModeProvider = new AudioModeProvider(); - private int mAudioMode = CallAudioState.ROUTE_EARPIECE; + private int mAudioMode = CallAudioStateCompat.ROUTE_EARPIECE; private boolean mMuted = false; - private int mSupportedModes = CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_BLUETOOTH | - CallAudioState.ROUTE_WIRED_HEADSET | CallAudioState.ROUTE_SPEAKER; + private int mSupportedModes = CallAudioStateCompat.ROUTE_EARPIECE + | CallAudioStateCompat.ROUTE_BLUETOOTH | CallAudioStateCompat.ROUTE_WIRED_HEADSET + | CallAudioStateCompat.ROUTE_SPEAKER; private final List mListeners = Lists.newArrayList(); public static AudioModeProvider getInstance() { return sAudioModeProvider; } - public void onAudioStateChanged(CallAudioState audioState) { - onAudioModeChange(audioState.getRoute(), audioState.isMuted()); - onSupportedAudioModeChange(audioState.getSupportedRouteMask()); + public void onAudioStateChanged(boolean isMuted, int route, int supportedRouteMask) { + onAudioModeChange(route, isMuted); + onSupportedAudioModeChange(supportedRouteMask); } public void onAudioModeChange(int newMode, boolean muted) { -- cgit v1.2.3