summaryrefslogtreecommitdiff
path: root/java/com/android/incallui
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2018-04-27 15:15:23 -0700
committerCopybara-Service <copybara-piper@google.com>2018-04-28 22:27:31 -0700
commit859300301faa4a14415aa2080df9f0ddea2a5e2c (patch)
treeef22de66867f7d5e90f38a01af95983463e2f858 /java/com/android/incallui
parentbb94ca670290484b4f6a801735870f21328d49c2 (diff)
Remove audio change behavior for background calling.
Bug: 74022483 Test: manual PiperOrigin-RevId: 194600612 Change-Id: Idc15d873abfcb47a799e43468ffdd0fe1d90cc5c
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r--java/com/android/incallui/InCallPresenter.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index 670af9d54..8193c6e05 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -273,8 +273,6 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud
private SpeakEasyCallManager speakEasyCallManager;
- private boolean audioRouteSetForBubbleMode;
-
/** Inaccessible constructor. Must use getRunningInstance() to get this singleton. */
@VisibleForTesting
InCallPresenter() {}
@@ -1612,8 +1610,6 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud
isChangingConfigurations = false;
- audioRouteSetForBubbleMode = false;
-
// blow away stale contact info so that we get fresh data on
// the next set of calls
if (contactInfoCache != null) {
@@ -1893,42 +1889,11 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud
@Override
public void onAudioStateChanged(CallAudioState audioState) {
- // Set sensible audio route for bubble mode when we get real audio state for the first time
- // During the first time this function is called, supportedRouteMask is set to
- // SUPPORTED_AUDIO_ROUTE_ALL, but it's OK since shouldStartInBubbleMode() is false at that time
- // (callList not updated yet).
- if (!audioRouteSetForBubbleMode && shouldStartInBubbleMode()) {
- setAudioRouteForBubbleMode(audioState);
- audioRouteSetForBubbleMode = true;
- }
-
if (statusBarNotifier != null) {
statusBarNotifier.updateNotification();
}
}
- /**
- * Set audio route to make audio sensible. According to availability, set audio route to Bluetooth
- * or wired headset or speaker.
- */
- private void setAudioRouteForBubbleMode(CallAudioState audioState) {
- if ((audioState.getSupportedRouteMask() & CallAudioState.ROUTE_BLUETOOTH)
- == CallAudioState.ROUTE_BLUETOOTH) {
- // Use Bluetooth if available
- TelecomAdapter.getInstance().setAudioRoute(CallAudioState.ROUTE_BLUETOOTH);
- LogUtil.i("InCallPrenter.setAudioRouteForBubbleMode", "bluetooth");
- } else if ((audioState.getSupportedRouteMask() & CallAudioState.ROUTE_WIRED_HEADSET)
- == CallAudioState.ROUTE_WIRED_HEADSET) {
- // Use wired headset if available
- TelecomAdapter.getInstance().setAudioRoute(CallAudioState.ROUTE_WIRED_HEADSET);
- LogUtil.i("InCallPrenter.setAudioRouteForBubbleMode", "wired headset");
- } else {
- // Use speaker
- TelecomAdapter.getInstance().setAudioRoute(CallAudioState.ROUTE_SPEAKER);
- LogUtil.i("InCallPrenter.setAudioRouteForBubbleMode", "speaker");
- }
- }
-
/** All the main states of InCallActivity. */
public enum InCallState {
// InCall Screen is off and there are no calls