Closed FredericYan closed 1 year ago
在SingleVideoFragment类中的init()方法内有一处偶现的数组越界异常; 偶现,非必现,错误信息如下:
java.lang.IndexOutOfBoundsException Index: 0, Size: 0 解析原始 1 java.util.ArrayList.get(ArrayList.java) 2 cn.wildfire.chat.kit.voip.SingleVideoFragment.init(SingleVideoFragment.java)
问题所在代码片段如下: private void init() { gEngineKit = ((SingleCallActivity) getActivity()).getEngineKit(); AVEngineKit.CallSession session = gEngineKit.getCurrentSession(); if (session == null || AVEngineKit.CallState.Idle == session.getState()) { getActivity().finish(); getActivity().overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); } else if (AVEngineKit.CallState.Connected == session.getState()) { incomingActionContainer.setVisibility(View.GONE); outgoingActionContainer.setVisibility(View.GONE); connectedActionContainer.setVisibility(View.VISIBLE); inviteeInfoContainer.setVisibility(View.GONE);
targetId = session.getParticipantIds().get(0); <----------------------------------此处数组越界 focusUserId = targetId; 。。。。。。。。 。。。。。。。。
在SingleVideoFragment类中的init()方法内有一处偶现的数组越界异常; 偶现,非必现,错误信息如下:
main(1)
java.lang.IndexOutOfBoundsException Index: 0, Size: 0 解析原始 1 java.util.ArrayList.get(ArrayList.java) 2 cn.wildfire.chat.kit.voip.SingleVideoFragment.init(SingleVideoFragment.java)
问题所在代码片段如下:
private void init() { gEngineKit = ((SingleCallActivity) getActivity()).getEngineKit(); AVEngineKit.CallSession session = gEngineKit.getCurrentSession(); if (session == null || AVEngineKit.CallState.Idle == session.getState()) { getActivity().finish(); getActivity().overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); } else if (AVEngineKit.CallState.Connected == session.getState()) { incomingActionContainer.setVisibility(View.GONE); outgoingActionContainer.setVisibility(View.GONE); connectedActionContainer.setVisibility(View.VISIBLE); inviteeInfoContainer.setVisibility(View.GONE);