diff options
Diffstat (limited to 'java/com/android/incallui/call')
-rw-r--r-- | java/com/android/incallui/call/CallList.java | 13 | ||||
-rw-r--r-- | java/com/android/incallui/call/DialerCall.java | 8 | ||||
-rw-r--r-- | java/com/android/incallui/call/DialerCallListener.java | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/java/com/android/incallui/call/CallList.java b/java/com/android/incallui/call/CallList.java index 01f3b9d29..eccdceeca 100644 --- a/java/com/android/incallui/call/CallList.java +++ b/java/com/android/incallui/call/CallList.java @@ -784,6 +784,12 @@ public class CallList implements DialerCallDelegate { */ void onUpgradeToVideo(DialerCall call); + /** + * Called when a new RTT call request comes in This is the only method that gets called for RTT + * requests. + */ + default void onUpgradeToRtt(DialerCall call, int rttRequestId) {} + /** Called when the session modification state of a call changes. */ void onSessionModificationStateChange(DialerCall call); @@ -855,6 +861,13 @@ public class CallList implements DialerCallDelegate { public void onDialerCallLastForwardedNumberChange() {} @Override + public void onDialerCallUpgradeToRtt(int rttRequestId) { + for (Listener listener : listeners) { + listener.onUpgradeToRtt(call, rttRequestId); + } + } + + @Override public void onDialerCallUpgradeToVideo() { for (Listener listener : listeners) { listener.onUpgradeToVideo(call); diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index e08c926d8..35f9481c5 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -282,6 +282,9 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa @Override public void onRttRequest(Call call, int id) { LogUtil.v("TelecomCallCallback.onRttRequest", "id=%d", id); + for (DialerCallListener listener : listeners) { + listener.onDialerCallUpgradeToRtt(id); + } } @Override @@ -1033,6 +1036,11 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa getTelecomCall().sendRttRequest(); } + @TargetApi(28) + public void respondToRttRequest(boolean accept, int rttRequestId) { + getTelecomCall().respondToRttRequest(rttRequestId, accept); + } + public boolean hasReceivedVideoUpgradeRequest() { return VideoUtils.hasReceivedVideoUpgradeRequest(getVideoTech().getSessionModificationState()); } diff --git a/java/com/android/incallui/call/DialerCallListener.java b/java/com/android/incallui/call/DialerCallListener.java index 5d24a4d4b..37c30d30c 100644 --- a/java/com/android/incallui/call/DialerCallListener.java +++ b/java/com/android/incallui/call/DialerCallListener.java @@ -29,6 +29,8 @@ public interface DialerCallListener { void onDialerCallUpgradeToVideo(); + default void onDialerCallUpgradeToRtt(int rttRequestId) {} + void onDialerCallSessionModificationStateChange(); void onWiFiToLteHandover(); |