summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/CallButtonPresenter.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-05-13 15:16:45 -0700
committerYorke Lee <yorkelee@google.com>2015-05-13 15:16:45 -0700
commitf3e130ecc31c806b3466d48551f7a40a7b676b82 (patch)
tree40bce8a26571979ea7beb45e3be01d899773d47a /InCallUI/src/com/android/incallui/CallButtonPresenter.java
parent7148459b206294570f79886c8e304f596f2171d9 (diff)
Rename AudioState to CallAudioState
Deprecate AudioState class and make methods @SystemApi where necessary to minimize impact to SystemApi Replace usages of AudioState inside Telecom sub-systems Fire both onCallAudioStateChanged and onAudioStateChanged callbacks for backward compatibility Support both setAudioState and setCallAudioState for all classes Bug: 21040387 Bug: 21088300 Change-Id: I3ec7b3afdaa344c6d639d1c421f1842d67f7d0f7
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallButtonPresenter.java')
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index d3614789f..4fc60cac8 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -20,7 +20,7 @@ import static com.android.incallui.CallButtonFragment.Buttons.*;
import android.content.Context;
import android.os.Bundle;
-import android.telecom.AudioState;
+import android.telecom.CallAudioState;
import android.telecom.InCallService.VideoCall;
import android.telecom.VideoProfile;
@@ -176,7 +176,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
// an update for onAudioMode(). This will make UI response immediate
// if it turns out to be slow
- Log.d(this, "Sending new Audio Mode: " + AudioState.audioRouteToString(mode));
+ Log.d(this, "Sending new Audio Mode: " + CallAudioState.audioRouteToString(mode));
TelecomAdapter.getInstance().setAudioRoute(mode);
}
@@ -185,7 +185,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
*/
public void toggleSpeakerphone() {
// this function should not be called if bluetooth is available
- if (0 != (AudioState.ROUTE_BLUETOOTH & getSupportedAudio())) {
+ if (0 != (CallAudioState.ROUTE_BLUETOOTH & getSupportedAudio())) {
// It's clear the UI is wrong, so update the supported mode once again.
Log.e(this, "toggling speakerphone not allowed when bluetooth supported.");
@@ -193,11 +193,11 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
return;
}
- int newMode = AudioState.ROUTE_SPEAKER;
+ int newMode = CallAudioState.ROUTE_SPEAKER;
// if speakerphone is already on, change to wired/earpiece
- if (getAudioMode() == AudioState.ROUTE_SPEAKER) {
- newMode = AudioState.ROUTE_WIRED_OR_EARPIECE;
+ if (getAudioMode() == CallAudioState.ROUTE_SPEAKER) {
+ newMode = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
}
setAudioMode(newMode);