| | |
| | | import com.runt.open.mvi.OpenApplication; |
| | | import com.runt.open.mvi.data.PhoneDevice; |
| | | import com.runt.open.mvi.retrofit.net.NetWorkCost; |
| | | import com.runt.open.mvi.retrofit.net.NetWorkListenear; |
| | | import com.runt.open.mvi.retrofit.net.NetWorkListener; |
| | | import com.runt.open.mvi.retrofit.utils.HttpPrintUtils; |
| | | import com.runt.open.mvi.utils.DeviceUtil; |
| | | |
| | |
| | | int position = logArrays.size() +2; |
| | | response = chain.proceed(request); |
| | | logArrays.addAll(getResponseLog(response)); |
| | | NetWorkCost netWorkCost = NetWorkListenear.workCostMap.get(hashCode); |
| | | NetWorkCost netWorkCost = NetWorkListener.workCostMap.get(hashCode); |
| | | if(netWorkCost != null) { |
| | | logArrays.add(position, "<-- costtimes : " + netWorkCost); |
| | | } |
| | | NetWorkListenear.workCostMap.remove(hashCode); |
| | | NetWorkListener.workCostMap.remove(hashCode); |
| | | new Thread(){ |
| | | @Override |
| | | public void run() { |
| | |
| | | e.printStackTrace(); |
| | | } catch (Exception e) { |
| | | logArrays.add("<-- response url:" + URLDecoder.decode(request.url().toString(), "UTF-8")); |
| | | NetWorkCost netWorkCost = NetWorkListenear.workCostMap.get(hashCode); |
| | | NetWorkCost netWorkCost = NetWorkListener.workCostMap.get(hashCode); |
| | | if (netWorkCost != null) { |
| | | netWorkCost.total = new Date().getTime() - netWorkCost.total; |
| | | logArrays.add("<-- costtimes : " + netWorkCost); |
| | | } |
| | | NetWorkListenear.workCostMap.remove(hashCode); |
| | | NetWorkListener.workCostMap.remove(hashCode); |
| | | logArrays.add("<-- response failed " + e.getLocalizedMessage()); |
| | | logArrays.add("<-- " + e.toString()); |
| | | new Thread(){ |