Loading src/com/android/server/telecom/Call.java +9 −0 Original line number Diff line number Diff line Loading @@ -1672,4 +1672,13 @@ public class Call implements CreateConnectionResponse { } return CallState.DISCONNECTED; } /** * Determines if this call is in disconnected state and waiting to be destroyed. * * @return {@code true} if this call is disconected. */ public boolean isDisconnected() { return (getState() == CallState.DISCONNECTED || getState() == CallState.ABORTED); } } src/com/android/server/telecom/CallAudioManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -520,8 +520,7 @@ final class CallAudioManager extends CallsManagerListenerBase Log.v(this, "updateAudioStreamAndMode : no foreground, speeding up MT audio."); requestAudioFocusAndSetMode(AudioManager.STREAM_VOICE_CALL, AudioManager.MODE_IN_CALL); } else if (foregroundCall != null && foregroundCall.getState() != CallState.DISCONNECTED && } else if (foregroundCall != null && !foregroundCall.isDisconnected() && waitingForAccountSelectionCall == null) { // In the case where there is a call that is waiting for account selection, // this will fall back to abandonAudioFocus() below, which temporarily exits Loading @@ -540,7 +539,7 @@ final class CallAudioManager extends CallsManagerListenerBase Log.v(this, "updateAudioStreamAndMode : tone playing"); requestAudioFocusAndSetMode( AudioManager.STREAM_VOICE_CALL, mMostRecentlyUsedMode); } else if (!hasRingingForegroundCall()) { } else if (!hasRingingForegroundCall() && mCallsManager.hasOnlyDisconnectedCalls()) { Log.v(this, "updateAudioStreamAndMode : no ringing call"); abandonAudioFocus(); } else { Loading src/com/android/server/telecom/CallsManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,15 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx return false; } boolean hasOnlyDisconnectedCalls() { for (Call call : mCalls) { if (!call.isDisconnected()) { return false; } } return true; } boolean hasVideoCall() { for (Call call : mCalls) { if (VideoProfile.isVideo(call.getVideoState())) { Loading Loading
src/com/android/server/telecom/Call.java +9 −0 Original line number Diff line number Diff line Loading @@ -1672,4 +1672,13 @@ public class Call implements CreateConnectionResponse { } return CallState.DISCONNECTED; } /** * Determines if this call is in disconnected state and waiting to be destroyed. * * @return {@code true} if this call is disconected. */ public boolean isDisconnected() { return (getState() == CallState.DISCONNECTED || getState() == CallState.ABORTED); } }
src/com/android/server/telecom/CallAudioManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -520,8 +520,7 @@ final class CallAudioManager extends CallsManagerListenerBase Log.v(this, "updateAudioStreamAndMode : no foreground, speeding up MT audio."); requestAudioFocusAndSetMode(AudioManager.STREAM_VOICE_CALL, AudioManager.MODE_IN_CALL); } else if (foregroundCall != null && foregroundCall.getState() != CallState.DISCONNECTED && } else if (foregroundCall != null && !foregroundCall.isDisconnected() && waitingForAccountSelectionCall == null) { // In the case where there is a call that is waiting for account selection, // this will fall back to abandonAudioFocus() below, which temporarily exits Loading @@ -540,7 +539,7 @@ final class CallAudioManager extends CallsManagerListenerBase Log.v(this, "updateAudioStreamAndMode : tone playing"); requestAudioFocusAndSetMode( AudioManager.STREAM_VOICE_CALL, mMostRecentlyUsedMode); } else if (!hasRingingForegroundCall()) { } else if (!hasRingingForegroundCall() && mCallsManager.hasOnlyDisconnectedCalls()) { Log.v(this, "updateAudioStreamAndMode : no ringing call"); abandonAudioFocus(); } else { Loading
src/com/android/server/telecom/CallsManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,15 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx return false; } boolean hasOnlyDisconnectedCalls() { for (Call call : mCalls) { if (!call.isDisconnected()) { return false; } } return true; } boolean hasVideoCall() { for (Call call : mCalls) { if (VideoProfile.isVideo(call.getVideoState())) { Loading