| | |
| | | heart(); |
| | | } |
| | | } else if (msg.getType() == AppConfig.GET_BLE_DISCONNECT) { |
| | | preLevel = -1; |
| | | showStatus(-1); |
| | | pv.setStatusStr("未连接"); |
| | | pv.setPercent(0); |
| | |
| | | tv_shishi.setText("0"); |
| | | chonglian(); |
| | | stop(); |
| | | isVirating = false; |
| | | AudioUtils.virateCancle(getActivity()); |
| | | |
| | | } else if (msg.getType() == AppConfig.CHANGE_SETTING) { |
| | | if (timer != null) { |
| | | timer.cancel(); |
| | |
| | | doTask(); |
| | | } else if (msg.getType() == AppConfig.SET_MAIN_CALL) { |
| | | ((MainActivity) getActivity()).resetBLECallBack(); |
| | | }else if (msg.getType() == AppConfig.SET_VOICE) { |
| | | ArrayList<VoiceBean> temp = (ArrayList<VoiceBean>) FastJsonTools.getArrayJson(MainApp.theApp.sharedPreferencesUtil.getVideoList(), VoiceBean.class); |
| | | if (temp != null) { |
| | | voiceList.clear(); |
| | | voiceList.addAll(temp); |
| | | } else { |
| | | voiceList.clear(); |
| | | VoiceBean voiceBean = new VoiceBean(); |
| | | voiceBean.setId(0); |
| | | voiceBean.setRes(AppConfig.voideUrl1); |
| | | voiceBean.setName("轻微铃声"); |
| | | voiceList.add(voiceBean); |
| | | voiceBean = new VoiceBean(); |
| | | voiceBean.setId(1); |
| | | voiceBean.setRes(AppConfig.voideUrl2); |
| | | voiceBean.setName("中度铃声"); |
| | | voiceList.add(voiceBean); |
| | | voiceBean = new VoiceBean(); |
| | | voiceBean.setId(2); |
| | | voiceBean.setRes(AppConfig.voideUrl3); |
| | | voiceBean.setName("严重铃声"); |
| | | voiceList.add(voiceBean); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | voiceList.clear(); |
| | | VoiceBean voiceBean = new VoiceBean(); |
| | | voiceBean.setId(0); |
| | | voiceBean.setRes(VoiceSetActivity.voideUrl1); |
| | | voiceBean.setRes(AppConfig.voideUrl1); |
| | | voiceBean.setName("轻微铃声"); |
| | | voiceList.add(voiceBean); |
| | | voiceBean = new VoiceBean(); |
| | | voiceBean.setId(1); |
| | | voiceBean.setRes(VoiceSetActivity.voideUrl2); |
| | | voiceBean.setRes(AppConfig.voideUrl2); |
| | | voiceBean.setName("中度铃声"); |
| | | voiceList.add(voiceBean); |
| | | voiceBean = new VoiceBean(); |
| | | voiceBean.setId(2); |
| | | voiceBean.setRes(VoiceSetActivity.voideUrl3); |
| | | voiceBean.setRes(AppConfig.voideUrl3); |
| | | voiceBean.setName("严重铃声"); |
| | | voiceList.add(voiceBean); |
| | | } |
| | |
| | | chonglianTimer = null; |
| | | } |
| | | stop(); |
| | | isVirating = false; |
| | | AudioUtils.virateCancle(getActivity()); |
| | | } |
| | | |
| | | @Override |