标签:

06-19 19:05:41.437 3329-4362/com.android.phone V/ImsSenderRxr: Read packet: 24 bytes06-19 19:05:41.437 3329-4362/com.android.phone V/ImsSenderRxr: processResponse[SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: Response data: [12, 13, -1, -1, -1, -1, 16, 3, 24, -49, 1, 32, 0, 21, 1, 0, 0, 0, 26, 4, 8, 3, 16, 2][SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: Tag -1 3 207 0[SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: responseModifyCall 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0[SUB1]06-19 19:05:41.438 3329-4362/com.android.phone D/ImsSenderRxr: [UNSL]< UNSOL_MODIFY_CALL 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0[SUB1]06-19 19:05:41.438 3329-3329/com.android.phone D/ImsServiceSub: Message received: what = 1306-19 19:05:41.438 3329-3329/com.android.phone D/ImsServiceSub: handleCallModifyRequest( 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0)06-19 19:05:41.438 3329-3329/com.android.phone D/VideoCall_ImsCallModification: onReceivedCallModify( 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0)06-19 19:05:41.438 3329-3329/com.android.phone D/VideoCall_ImsCallModification: validateIncomingModifyConnectionType newCallType = 306-19 19:05:41.438 3329-3329/com.android.phone D/VideoCall_ImsCallModification: validateIncomingModifyConnectionType modifyToCurrCallType = false isIndexValid = true isLowBattery = false06-19 19:05:41.439 3329-3329/com.android.phone D/VideoCall_ImsVideoCallProviderImpl: (1) onCallTypeChanged session= callid= 1 mediaId=5
/** @see Connection.VideoProvider#receiveSessionModifyRequest */public void receiveSessionModifyRequest(VideoProfile VideoProfile) {if (mCallback != null) {try {mCallback.receiveSessionModifyRequest(VideoProfile);} catch (RemoteException ignored) {}}}
/*** IImsVideoCallCallback stub implementation.*/private final class ImsVideoCallCallback extends IImsVideoCallCallback.Stub {@Overridepublic void receiveSessionModifyRequest(VideoProfile VideoProfile) {mHandler.obtainMessage(MSG_RECEIVE_SESSION_MODIFY_REQUEST,VideoProfile).sendToTarget();}
/** Default handler used to consolidate binder method calls onto a single thread. */private final Handler mHandler = new Handler(Looper.getMainLooper()) {@Overridepublic void handleMessage(Message msg) {SomeArgs args;switch (msg.what) {case MSG_RECEIVE_SESSION_MODIFY_REQUEST:receiveSessionModifyRequest((VideoProfile) msg.obj);break;
/*** Used to inform listening {@link InCallService} implementations when the* {@link VideoProvider} receives a session modification request.* <p>* Received by the {@link InCallService} via* {@link InCallService.VideoCall.Callback#onSessionModifyRequestReceived(VideoProfile)},** @param videoProfile The requested video profile.* @see #onSendSessionModifyRequest(VideoProfile, VideoProfile)*/public void receiveSessionModifyRequest(VideoProfile videoProfile) {if (mVideoCallbacks != null) {for (IVideoCallback callback : mVideoCallbacks.values()) {try {callback.receiveSessionModifyRequest(videoProfile);//多处调用} catch (RemoteException ignored) {Log.w(this, "receiveSessionModifyRequest callback failed", ignored);}}}}
/*** IVideoCallback stub implementation.*/private final class VideoCallListenerBinder extends IVideoCallback.Stub {@Overridepublic void receiveSessionModifyRequest(VideoProfile videoProfile) {if (mHandler == null) {return;}mHandler.obtainMessage(MessageHandler.MSG_RECEIVE_SESSION_MODIFY_REQUEST,videoProfile).sendToTarget();}
@Overridepublic void handleMessage(Message msg) {if (mCallback == null) {return;}SomeArgs args;switch (msg.what) {case MSG_RECEIVE_SESSION_MODIFY_REQUEST:mCallback.onSessionModifyRequestReceived((VideoProfile) msg.obj);break;
/*** Handles an incoming session modification request.** @param videoProfile The requested video call profile.*/@Overridepublic void onSessionModifyRequestReceived(VideoProfile videoProfile) {Log.d(this, " onSessionModifyRequestReceived videoProfile=" + videoProfile);int previousVideoState = CallUtils.getUnPausedVideoState(mCall.getVideoState());int newVideoState = CallUtils.getUnPausedVideoState(videoProfile.getVideoState());InCallPresenter.getInstance().wakeUpScreen();boolean wasVideoCall = CallUtils.isVideoCall(previousVideoState);boolean isVideoCall = CallUtils.isVideoCall(newVideoState);// Check for upgrades to video and downgrades to audio.if (wasVideoCall && !isVideoCall) {InCallVideoCallCallbackNotifier.getInstance().downgradeToAudio(mCall);} else if (previousVideoState != newVideoState) {InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoRequest(mCall,newVideoState);}}
/*** Inform listeners of an upgrade to video request for a call.* @param call The call.* @param videoState The video state we want to upgrade to.*/public void upgradeToVideoRequest(Call call, int videoState) {Log.d(this, "upgradeToVideoRequest call = " + call + " new video state = " + videoState);for (SessionModificationListener listener : mSessionModificationListeners) {listener.onUpgradeToVideoRequest(call, videoState);}}
@Overridepublic void onUpgradeToVideoRequest(Call call, int videoState) {Log.d(this, "onUpgradeToVideoRequest call = " + call + " video state = " + videoState);if (call == null) {return;}call.setSessionModificationTo(videoState);}
/*** This method is called when we request for a video upgrade or downgrade. This handles the* session modification state RECEIVED_UPGRADE_TO_VIDEO_REQUEST and sets the video state we* want to upgrade/downgrade to.*/public void setSessionModificationTo(int videoState) {Log.d(this, "setSessionModificationTo - video state= " + videoState);if (videoState == getVideoState()) {mSessionModificationState = Call.SessionModificationState.NO_REQUEST;Log.w(this,"setSessionModificationTo - Clearing session modification state");} else {mSessionModificationState =Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;setModifyToVideoState(videoState);CallList.getInstance().onUpgradeToVideo(this);}Log.d(this, "setSessionModificationTo - mSessionModificationState="+ mSessionModificationState + " video state= " + videoState);update();}
public void onUpgradeToVideo(Call call){Log.d(this, "onUpgradeToVideo call=" + call);for (Listener listener : mListeners) {listener.onUpgradeToVideo(call);}}
* Called when a new modify call request comes in* This is the only method that gets called for modify requests.*/public void onUpgradeToVideo(Call call);
@Overridepublic void onUpgradeToVideo(Call call) {Log.d(this, "onUpgradeToVideo: " + this + " call=" + call);showAnswerUi(true);//一次boolean isUpgradePending = isVideoUpgradePending(call);InCallPresenter inCallPresenter = InCallPresenter.getInstance();if (isUpgradePending&& inCallPresenter.getInCallState() == InCallPresenter.InCallState.INCOMING) {Log.d(this, "declining upgrade request");//If there is incoming call reject upgrade requestinCallPresenter.declineUpgradeRequest(getUi().getContext());} else if (isUpgradePending) {Log.d(this, "process upgrade request as no MT call");processVideoUpgradeRequestCall(call);}}
private void processVideoUpgradeRequestCall(Call call) {Log.d(this, " processVideoUpgradeRequestCall call=" + call);int subId = call.getSubId();int phoneId = mCalls.getPhoneId(subId);mCallId[phoneId] = call.getId();mCall[phoneId] = call;// Listen for call updates for the current call.CallList.getInstance().addCallUpdateListener(mCallId[phoneId], this);final int currentVideoState = call.getVideoState();final int modifyToVideoState = call.getModifyToVideoState();if (currentVideoState == modifyToVideoState) {Log.w(this, "processVideoUpgradeRequestCall: Video states are same. Return.");return;}AnswerUi ui = getUi();if (ui == null) {Log.e(this, "Ui is null. Can‘t process upgrade request");return;}showAnswerUi(true);//2次ui.showTargets(QtiCallUtils.getSessionModificationOptions(getUi().getContext(),currentVideoState, modifyToVideoState));}
/*** Returns the session modification user options based on session modify request video states* (current video state and modify request video state)*/public static int getSessionModificationOptions(Context context, int currentVideoState,int modifyToVideoState) {if (!useExt(context)) {return AnswerFragment.TARGET_SET_FOR_VIDEO_ACCEPT_REJECT_REQUEST;}if (showVideoUpgradeOptions(currentVideoState, modifyToVideoState)) {return AnswerFragment.TARGET_SET_FOR_QTI_VIDEO_ACCEPT_REJECT_REQUEST;} else if (isEnabled(VideoProfile.STATE_BIDIRECTIONAL, modifyToVideoState)) {return AnswerFragment.TARGET_SET_FOR_QTI_BIDIRECTIONAL_VIDEO_ACCEPT_REJECT_REQUEST;} else if (isEnabled(VideoProfile.STATE_TX_ENABLED, modifyToVideoState)) {return AnswerFragment.TARGET_SET_FOR_QTI_VIDEO_TRANSMIT_ACCEPT_REJECT_REQUEST;} else if (isEnabled(VideoProfile.STATE_RX_ENABLED, modifyToVideoState)) {return AnswerFragment.TARGET_SET_FOR_QTI_VIDEO_RECEIVE_ACCEPT_REJECT_REQUEST;}return AnswerFragment.TARGET_SET_FOR_QTI_VIDEO_ACCEPT_REJECT_REQUEST;}
/*** Checks the boolean flag in config file to figure out if we are going to use Qti extension or* not*/public static boolean useExt(Context context) {if (context == null) {Log.w(context, "Context is null...");}return isConfigEnabled(context, R.bool.video_call_use_ext);//这个布尔值默认为true,但是针对mnc为405的都重写成了false}
/*** Sets targets on the glowpad according to target set identified by the parameter.* @param targetSet Integer identifying the set of targets to use.*/public void showTargets(int targetSet) {showTargets(targetSet, VideoProfile.STATE_BIDIRECTIONAL);}/*** Sets targets on the glowpad according to target set identified by the parameter.* @param targetSet Integer identifying the set of targets to use.*/@Overridepublic void showTargets(int targetSet, int videoState) {final int targetResourceId;final int targetDescriptionsResourceId;final int directionDescriptionsResourceId;final int handleDrawableResourceId;mGlowpad.setVideoState(videoState);final boolean isEnhanceUIEnabled = getContext().getResources().getBoolean(R.bool.config_enable_enhance_video_call_ui);switch (targetSet) {...case TARGET_SET_FOR_VIDEO_ACCEPT_REJECT_REQUEST:targetResourceId =R.array.incoming_call_widget_video_request_targets;targetDescriptionsResourceId =R.array.incoming_call_widget_video_request_target_descriptions;directionDescriptionsResourceId = R.array.incoming_call_widget_video_request_target_direction_descriptions;handleDrawableResourceId = R.drawable.ic_incall_video_handle;break;
06-19 19:05:41.622 14182-14182/com.android.dialer I/InCall: StatusBarNotifier - Will show "dismiss upgrade" action in the incoming call Notification06-19 19:05:41.624 14182-14182/com.android.dialer I/InCall: StatusBarNotifier - Will show "accept upgrade" action in the incoming call Notification
//receive06-19 19:05:41.437 3329-4362/com.android.phone V/ImsSenderRxr: Read packet: 24 bytes06-19 19:05:41.437 3329-4362/com.android.phone V/ImsSenderRxr: processResponse[SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: Response data: [12, 13, -1, -1, -1, -1, 16, 3, 24, -49, 1, 32, 0, 21, 1, 0, 0, 0, 26, 4, 8, 3, 16, 2][SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: Tag -1 3 207 0[SUB1]06-19 19:05:41.437 3329-4362/com.android.phone D/ImsSenderRxr: responseModifyCall 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0[SUB1]06-19 19:05:41.438 3329-4362/com.android.phone D/ImsSenderRxr: [UNSL]< UNSOL_MODIFY_CALL 1 3 2 callSubState 0 videoPauseState2 mediaId-1 Local Ability Peer Ability Cause code 0 0[SUB1]
//accepted response06-25 21:37:21.793 3289-4294/com.android.phone V/ImsSenderRxr: Read packet: 12 bytes06-25 21:37:21.793 3289-4294/com.android.phone V/ImsSenderRxr: processResponse[SUB1]06-25 21:37:21.793 3289-4294/com.android.phone D/ImsSenderRxr: Response data: [11, 13, 110, 0, 0, 0, 16, 2, 24, 17, 32, 0][SUB1]06-25 21:37:21.793 3289-4294/com.android.phone D/ImsSenderRxr: Tag 110 2 17 0[SUB1]06-25 21:37:21.793 3289-4294/com.android.phone D/ImsSenderRxr: [0110]< MODIFY_CALL_INITIATE [SUB1]06-25 21:37:21.793 3289-3289/com.android.phone D/VideoCall_ImsCallModification: EVENT_MODIFY_CALL_INITIATE_DONE received
//send request06-21 16:00:12.167 13623-13623/com.android.phone D/ImsSenderRxr: [0021]> MODIFY_CALL_INITIATE[SUB0]//reject06-21 16:00:19.129 13623-14690/com.android.phone D/ImsSenderRxr: [0021]< MODIFY_CALL_INITIATE error: 2806-21 16:00:19.129 13623-13623/com.android.phone D/VideoCall_ImsCallModification: EVENT_MODIFY_CALL_INITIATE_DONE received//send request07-17 10:00:11.655 2915-2915/com.android.phone D/ImsSenderRxr: [0028]> MODIFY_CALL_INITIATE[SUB1]//time out07-17 10:00:27.733 2915-4049/com.android.phone D/ImsSenderRxr: [0028]< MODIFY_CALL_INITIATE error: 28 07-17 10:00:27.733 2915-2915/com.android.phone D/VideoCall_ImsCallModification: EVENT_MODIFY_CALL_INITIATE_DONE received07-17 10:00:27.748 13872-13872/com.android.dialer D/InCall: InCallVideoCallCallback - onSessionModifyResponseReceived status=5 requestedProfile=[VideoProfile videoState = Audio Tx Rx
E_REJECTED_BY_REMOTE = 28; /* Remote end rejected a change started byREQUEST_MODIFY_CALL_INITIATE */
IMS Modify Call (2) receive request 收到视频升级请求
标签:
原文地址:http://blog.csdn.net/aaa111/article/details/51932020