浏览代码

<修改呼叫挂断可能错乱bug,升级版本>

weizhengliang 5 年之前
父节点
当前提交
00962fafa8

+ 1 - 1
app/build.gradle

@@ -24,7 +24,7 @@ android {
         minSdkVersion 15
         minSdkVersion 15
         targetSdkVersion 26
         targetSdkVersion 26
         versionCode 1
         versionCode 1
-        versionName "1.31"
+        versionName "1.32"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         multiDexEnabled true
 
 

+ 1 - 1
app/src/main/java/com/wdkl/callingmainnurse/adapter/CallListAdapter.java

@@ -156,7 +156,7 @@ public class CallListAdapter extends RecyclerView.Adapter<CallListAdapter.MyView
             if (itemOnclickListener != null) {
             if (itemOnclickListener != null) {
                 itemOnclickListener.callListItemOnclick(view, getLayoutPosition());
                 itemOnclickListener.callListItemOnclick(view, getLayoutPosition());
                 selectedPosition = getLayoutPosition(); //选择的position赋值给参数,
                 selectedPosition = getLayoutPosition(); //选择的position赋值给参数,
-                notifyDataSetChanged();
+                //notifyDataSetChanged();
             }
             }
         }
         }
     }
     }

+ 5 - 3
app/src/main/java/com/wdkl/callingmainnurse/ui/fragment/CallingBedFragment.java

@@ -1205,10 +1205,11 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
      */
      */
     @Override
     @Override
     public void callListItemOnclick(View view, int position) {
     public void callListItemOnclick(View view, int position) {
-        if (!Constants.CALL_STATE.equals(Constants.STANDBY) && !callItemChooseEntity.equals(MyApplication.callEntityList.get(position))) {
+        if (!Constants.CALL_STATE.equals(Constants.STANDBY) /*&& !callItemChooseEntity.equals(MyApplication.callEntityList.get(position))*/) {
             ToastUtil.showToast("请先取消当前呼叫");
             ToastUtil.showToast("请先取消当前呼叫");
             return;
             return;
         }
         }
+        callListAdapter.notifyDataSetChanged();
         if (vRightCallListInfo.getVisibility() == View.VISIBLE && callItemChooseEntity.equals(MyApplication.callEntityList.get(position))) {
         if (vRightCallListInfo.getVisibility() == View.VISIBLE && callItemChooseEntity.equals(MyApplication.callEntityList.get(position))) {
             if (null == callItemChooseEntity) return;
             if (null == callItemChooseEntity) return;
             if (filterSipToast() && !MyApplication.callEntityList.get(position).getType().equals(Constants.WSHROOM_CALL) && !MyApplication.callEntityList.get(position).getType().equals(Constants.ROOMHELP_CALL)) {
             if (filterSipToast() && !MyApplication.callEntityList.get(position).getType().equals(Constants.WSHROOM_CALL) && !MyApplication.callEntityList.get(position).getType().equals(Constants.ROOMHELP_CALL)) {
@@ -1298,6 +1299,7 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
                                     }
                                     }
                                     ((MyApplication) getActivity().getApplication()).callEntityList.remove(callingEntity);
                                     ((MyApplication) getActivity().getApplication()).callEntityList.remove(callingEntity);
                                     sendNoAnyRequestDoor(callingEntity);
                                     sendNoAnyRequestDoor(callingEntity);
+                                    callingEntity = null;
                                     sendCallWaitingNumber(MyApplication.callEntityList.size());
                                     sendCallWaitingNumber(MyApplication.callEntityList.size());
                                     callListAdapter.notifyDataSetChanged();
                                     callListAdapter.notifyDataSetChanged();
                                     roomAdapter.notifyDataSetChanged();
                                     roomAdapter.notifyDataSetChanged();
@@ -1376,7 +1378,7 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
                     case "call_4"://增援呼叫护士主机
                     case "call_4"://增援呼叫护士主机
                     case "call_6": //门口机呼叫护士主机
                     case "call_6": //门口机呼叫护士主机
                         if (isMySelfMachine(nurseHostID)) {//只有属于自己管的机器才能加进列表
                         if (isMySelfMachine(nurseHostID)) {//只有属于自己管的机器才能加进列表
-                            if (!PalyPhonetics.speakEntityList.contains(udpEntity)) {
+                            if (!PalyPhonetics.speakEntityList.contains(udpEntity) && Constants.CALL_STATE.equals(Constants.STANDBY)) {
                                 addPhonetics(udpEntity); //在此加入列表队列 Waderson  20171101
                                 addPhonetics(udpEntity); //在此加入列表队列 Waderson  20171101
                             }
                             }
                             if (!MyApplication.callEntityList.contains(udpEntity)) {
                             if (!MyApplication.callEntityList.contains(udpEntity)) {
@@ -1392,7 +1394,7 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
                         break;
                         break;
                     case "call_12": //总控制室呼叫护士主机
                     case "call_12": //总控制室呼叫护士主机
                         if (isMySelfMachine(nurseHostID)) {
                         if (isMySelfMachine(nurseHostID)) {
-                            if (!PalyPhonetics.speakEntityList.contains(udpEntity)) {
+                            if (!PalyPhonetics.speakEntityList.contains(udpEntity) && Constants.CALL_STATE.equals(Constants.STANDBY)) {
                                 addPhonetics(udpEntity);
                                 addPhonetics(udpEntity);
                             }
                             }
                             if (!MyApplication.callEntityList.contains(udpEntity)) {
                             if (!MyApplication.callEntityList.contains(udpEntity)) {