diff options
Diffstat (limited to 'InCallUI/src/com/android/incallui/AnswerFragment.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/AnswerFragment.java | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerFragment.java b/InCallUI/src/com/android/incallui/AnswerFragment.java index 07cbfd573..d68a316c9 100644 --- a/InCallUI/src/com/android/incallui/AnswerFragment.java +++ b/InCallUI/src/com/android/incallui/AnswerFragment.java @@ -21,6 +21,7 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; +import android.telecom.VideoProfile; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; @@ -49,10 +50,7 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente public static final int TARGET_SET_FOR_AUDIO_WITH_SMS = 1; public static final int TARGET_SET_FOR_VIDEO_WITHOUT_SMS = 2; public static final int TARGET_SET_FOR_VIDEO_WITH_SMS = 3; - public static final int TARGET_SET_FOR_VIDEO_UPGRADE_REQUEST = 4; - public static final int TARGET_SET_FOR_BIDIRECTIONAL_VIDEO_ACCEPT_REJECT_REQUEST = 5; - public static final int TARGET_SET_FOR_VIDEO_TRANSMIT_ACCEPT_REJECT_REQUEST = 6; - public static final int TARGET_SET_FOR_VIDEO_RECEIVE_ACCEPT_REJECT_REQUEST = 7; + public static final int TARGET_SET_FOR_VIDEO_ACCEPT_REJECT_REQUEST = 4; /** * The popup showing the list of canned responses. @@ -124,12 +122,21 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente * Sets targets on the glowpad according to target set identified by the parameter. * @param targetSet Integer identifying the set of targets to use. */ - @Override public void showTargets(int targetSet) { + showTargets(targetSet, VideoProfile.VideoState.BIDIRECTIONAL); + } + + /** + * Sets targets on the glowpad according to target set identified by the parameter. + * @param targetSet Integer identifying the set of targets to use. + */ + @Override + public void showTargets(int targetSet, int videoState) { final int targetResourceId; final int targetDescriptionsResourceId; final int directionDescriptionsResourceId; final int handleDrawableResourceId; + mGlowpad.setVideoState(videoState); switch (targetSet) { case TARGET_SET_FOR_AUDIO_WITH_SMS: @@ -156,39 +163,13 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente R.array.incoming_call_widget_video_with_sms_direction_descriptions; handleDrawableResourceId = R.drawable.ic_incall_video_handle; break; - case TARGET_SET_FOR_VIDEO_UPGRADE_REQUEST: - targetResourceId = R.array.incoming_call_widget_video_upgrade_request_targets; - targetDescriptionsResourceId = - R.array.incoming_call_widget_video_upgrade_request_target_descriptions; - directionDescriptionsResourceId = R.array - .incoming_call_widget_video_upgrade_request_target_direction_descriptions; - handleDrawableResourceId = R.drawable.ic_incall_video_handle; - break; - case TARGET_SET_FOR_BIDIRECTIONAL_VIDEO_ACCEPT_REJECT_REQUEST: + case TARGET_SET_FOR_VIDEO_ACCEPT_REJECT_REQUEST: targetResourceId = - R.array.incoming_call_widget_bidirectional_video_accept_reject_request_targets; + R.array.incoming_call_widget_video_request_targets; targetDescriptionsResourceId = - R.array.incoming_call_widget_video_upgrade_request_target_descriptions; + R.array.incoming_call_widget_video_request_target_descriptions; directionDescriptionsResourceId = R.array - .incoming_call_widget_video_upgrade_request_target_direction_descriptions; - handleDrawableResourceId = R.drawable.ic_incall_video_handle; - break; - case TARGET_SET_FOR_VIDEO_TRANSMIT_ACCEPT_REJECT_REQUEST: - targetResourceId = - R.array.incoming_call_widget_video_transmit_accept_reject_request_targets; - targetDescriptionsResourceId = - R.array.incoming_call_widget_video_transmit_request_target_descriptions; - directionDescriptionsResourceId = R.array - .incoming_call_widget_video_upgrade_request_target_direction_descriptions; - handleDrawableResourceId = R.drawable.ic_incall_video_handle; - break; - case TARGET_SET_FOR_VIDEO_RECEIVE_ACCEPT_REJECT_REQUEST: - targetResourceId = - R.array.incoming_call_widget_video_receive_accept_reject_request_targets; - targetDescriptionsResourceId = - R.array.incoming_call_widget_video_receive_request_target_descriptions; - directionDescriptionsResourceId = R.array - .incoming_call_widget_video_upgrade_request_target_direction_descriptions; + .incoming_call_widget_video_request_target_direction_descriptions; handleDrawableResourceId = R.drawable.ic_incall_video_handle; break; case TARGET_SET_FOR_AUDIO_WITHOUT_SMS: @@ -376,6 +357,11 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente } @Override + public void onDeclineUpgradeRequest(Context context) { + InCallPresenter.getInstance().declineUpgradeRequest(context); + } + + @Override public void onText() { getPresenter().onText(); } |