summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuchand Ghosh <suchan@codeaurora.org>2015-12-09 12:33:05 +0530
committerSteve Kondik <steve@cyngn.com>2016-05-19 18:30:05 -0700
commit4e997b5bb33a5c8c82d9f838ee135b68d9b10d5a (patch)
treed6a8580796555d558b784ef12f854e1e93d6649d
parent50e008d19ebf90291cba3d3834deaad74b445825 (diff)
downloadandroid_packages_services_Telecomm-4e997b5bb33a5c8c82d9f838ee135b68d9b10d5a.tar.gz
android_packages_services_Telecomm-4e997b5bb33a5c8c82d9f838ee135b68d9b10d5a.tar.bz2
android_packages_services_Telecomm-4e997b5bb33a5c8c82d9f838ee135b68d9b10d5a.zip
IMS: Abandon audio focus if no other call exist.
Sometimes call get disconnected due RTP inactive when user dials empty URI list. Here telephony set audio mode normal when foreground call get transit to conf call. This triggers audio to initiate end all calls. Add code to check if there is any more call exist before abandon audio focus. Change-Id: I518053cb3f3ed8ab877e875e25460c14275891b8 CRs-Fixed: 935317
-rw-r--r--src/com/android/server/telecom/CallAudioManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/server/telecom/CallAudioManager.java b/src/com/android/server/telecom/CallAudioManager.java
index dcfb42ce..a946d809 100644
--- a/src/com/android/server/telecom/CallAudioManager.java
+++ b/src/com/android/server/telecom/CallAudioManager.java
@@ -586,7 +586,10 @@ final class CallAudioManager extends CallsManagerListenerBase
AudioManager.STREAM_VOICE_CALL, mMostRecentlyUsedMode);
} else if (!hasRingingForegroundCall() && mCallsManager.hasOnlyDisconnectedCalls()) {
Log.v(this, "updateAudioStreamAndMode : no ringing call");
- abandonAudioFocus();
+ // Request to set audio mode normal. Here confirm if any call exist.
+ if (!hasAnyCalls()) {
+ abandonAudioFocus();
+ }
} else {
// mIsRinging is false, but there is a foreground ringing call present. Don't
// abandon audio focus immediately to prevent audio focus from getting lost between
@@ -779,6 +782,10 @@ final class CallAudioManager extends CallsManagerListenerBase
return UserHandle.USER_OWNER;
}
+ private boolean hasAnyCalls() {
+ return mCallsManager.hasAnyCalls();
+ }
+
/**
* Translates an {@link AudioManager} stream type to a human-readable string description.
*