Loading src/com/android/server/telecom/Call.java +7 −0 Original line number Diff line number Diff line Loading @@ -1925,6 +1925,13 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, if (didRttChange) { if ((mConnectionProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT) { // If we already had RTT streams up, that means that either the call started // with RTT or the user previously requested to start RTT. Either way, don't // play the alert tone. if (!areRttStreamsInitialized()) { mCallsManager.playRttUpgradeToneForCall(this); } createRttStreams(); // Call startRtt to pass the RTT pipes down to the connection service. // They already turned on the RTT property so no request should be sent. Loading src/com/android/server/telecom/CallAudioManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,14 @@ public class CallAudioManager extends CallsManagerListenerBase { } } public void playRttUpgradeTone(Call call) { if (call != mForegroundCall) { // We only play tones for foreground calls. return; } mPlayerFactory.createPlayer(InCallTonePlayer.TONE_RTT_REQUEST).startTone(); } /** * Play or stop a call hold tone for a call. Triggered via * {@link Connection#sendConnectionEvent(String)} when the Loading src/com/android/server/telecom/CallsManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -2744,6 +2744,16 @@ public class CallsManager extends Call.ListenerBase updateCanAddCall(); } @Override public void onRemoteRttRequest(Call call, int requestId) { Log.i(this, "onRemoteRttRequest: call %s", call.getId()); playRttUpgradeToneForCall(call); } public void playRttUpgradeToneForCall(Call call) { mCallAudioManager.playRttUpgradeTone(call); } // Construct the list of possible PhoneAccounts that the outgoing call can use based on the // active calls in CallsManager. If any of the active calls are on a SIM based PhoneAccount, // then include only that SIM based PhoneAccount and any non-SIM PhoneAccounts, such as SIP. Loading src/com/android/server/telecom/InCallTonePlayer.java +2 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ public class InCallTonePlayer extends Thread { public static final int TONE_UNOBTAINABLE_NUMBER = 12; public static final int TONE_VOICE_PRIVACY = 13; public static final int TONE_VIDEO_UPGRADE = 14; public static final int TONE_RTT_REQUEST = 15; private static final int TONE_RESOURCE_ID_UNDEFINED = -1; Loading Loading @@ -329,6 +330,7 @@ public class InCallTonePlayer extends Thread { // TODO: fill in. throw new IllegalStateException("Voice privacy tone NYI."); case TONE_VIDEO_UPGRADE: case TONE_RTT_REQUEST: // Similar to the call waiting tone, but does not repeat. toneType = ToneGenerator.TONE_SUP_CALL_WAITING; toneVolume = RELATIVE_VOLUME_HIPRI; Loading Loading
src/com/android/server/telecom/Call.java +7 −0 Original line number Diff line number Diff line Loading @@ -1925,6 +1925,13 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, if (didRttChange) { if ((mConnectionProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT) { // If we already had RTT streams up, that means that either the call started // with RTT or the user previously requested to start RTT. Either way, don't // play the alert tone. if (!areRttStreamsInitialized()) { mCallsManager.playRttUpgradeToneForCall(this); } createRttStreams(); // Call startRtt to pass the RTT pipes down to the connection service. // They already turned on the RTT property so no request should be sent. Loading
src/com/android/server/telecom/CallAudioManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,14 @@ public class CallAudioManager extends CallsManagerListenerBase { } } public void playRttUpgradeTone(Call call) { if (call != mForegroundCall) { // We only play tones for foreground calls. return; } mPlayerFactory.createPlayer(InCallTonePlayer.TONE_RTT_REQUEST).startTone(); } /** * Play or stop a call hold tone for a call. Triggered via * {@link Connection#sendConnectionEvent(String)} when the Loading
src/com/android/server/telecom/CallsManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -2744,6 +2744,16 @@ public class CallsManager extends Call.ListenerBase updateCanAddCall(); } @Override public void onRemoteRttRequest(Call call, int requestId) { Log.i(this, "onRemoteRttRequest: call %s", call.getId()); playRttUpgradeToneForCall(call); } public void playRttUpgradeToneForCall(Call call) { mCallAudioManager.playRttUpgradeTone(call); } // Construct the list of possible PhoneAccounts that the outgoing call can use based on the // active calls in CallsManager. If any of the active calls are on a SIM based PhoneAccount, // then include only that SIM based PhoneAccount and any non-SIM PhoneAccounts, such as SIP. Loading
src/com/android/server/telecom/InCallTonePlayer.java +2 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ public class InCallTonePlayer extends Thread { public static final int TONE_UNOBTAINABLE_NUMBER = 12; public static final int TONE_VOICE_PRIVACY = 13; public static final int TONE_VIDEO_UPGRADE = 14; public static final int TONE_RTT_REQUEST = 15; private static final int TONE_RESOURCE_ID_UNDEFINED = -1; Loading Loading @@ -329,6 +330,7 @@ public class InCallTonePlayer extends Thread { // TODO: fill in. throw new IllegalStateException("Voice privacy tone NYI."); case TONE_VIDEO_UPGRADE: case TONE_RTT_REQUEST: // Similar to the call waiting tone, but does not repeat. toneType = ToneGenerator.TONE_SUP_CALL_WAITING; toneVolume = RELATIVE_VOLUME_HIPRI; Loading