summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallPresenter.java')
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index cf43fbd66..79085acfe 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -525,6 +525,38 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
}
}
+ public void acceptUpgradeRequest(Context context) {
+ // Bail if we have been shut down and the call list is null.
+ if (mCallList == null) {
+ StatusBarNotifier.clearInCallNotification(context);
+ return;
+ }
+
+ Call call = mCallList.getVideoUpgradeRequestCall();
+ if (call != null) {
+ VideoCallProfile videoProfile =
+ new VideoCallProfile(VideoCallProfile.VideoState.BIDIRECTIONAL);
+ call.getVideoCall().sendSessionModifyResponse(videoProfile);
+ call.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
+ }
+ }
+
+ public void declineUpgradeRequest(Context context) {
+ // Bail if we have been shut down and the call list is null.
+ if (mCallList == null) {
+ StatusBarNotifier.clearInCallNotification(context);
+ return;
+ }
+
+ Call call = mCallList.getVideoUpgradeRequestCall();
+ if (call != null) {
+ VideoCallProfile videoProfile =
+ new VideoCallProfile(VideoCallProfile.VideoState.AUDIO_ONLY);
+ call.getVideoCall().sendSessionModifyResponse(videoProfile);
+ call.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
+ }
+ }
+
/**
* Returns true if the incall app is the foreground application.
*/