From fc9dc236266700d61e3538bee669f2f4abb242f2 Mon Sep 17 00:00:00 2001
From: 陈奇 <1650699704@qq.com>
Date: Tue, 13 Nov 2018 14:14:22 +0800
Subject: [PATCH] 1.0.3-1测试版本 [*]修改重新连接的方式 [*]修改商城连接 [*]修改心跳机制 [*]主要针对oppo和vivo机型添加开启定位服务
---
app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java b/app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java
index 86ef576..6c4ee08 100644
--- a/app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java
+++ b/app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java
@@ -55,7 +55,6 @@
import com.moral.yunfushao.ui.PanelView;
import com.moral.yunfushao.utils.AudioUtils;
import com.moral.yunfushao.utils.DebugUtils;
-import com.moral.yunfushao.utils.T;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -136,7 +135,6 @@
private Runnable reconnectRunnable = new Runnable() {
@Override
public void run() {
- System.out.println("chenqi ������������");
//������
if (mBluetoothService == null) {
return;
@@ -259,7 +257,7 @@
}
});
//������handler
- resetHandler();
+ HEARTTIMES = 2;
//������������
heart();
}
@@ -348,15 +346,13 @@
public void onResume() {
super.onResume();
isMySelfPage = true;
- reconnect();
textShowMac();
}
@Override
public void onPause() {
super.onPause();
- //������������������������
- T.show("onPause");
+ System.out.println("chenqi onPause");
isMySelfPage = false;
stopReconnect();
}
@@ -364,6 +360,7 @@
@Override
public void onDestroy() {
super.onDestroy();
+ System.out.println("chenqi onDestroy");
EventBus.getDefault().unregister(this);
if (timer != null) {
timer.cancel();
@@ -526,14 +523,11 @@
handler.postDelayed(reconnectRunnable, 0);
}
}
-
/**
* ������������
*/
private void stopReconnect() {
handler.removeCallbacks(reconnectRunnable);
- if (mBluetoothService != null)
- mBluetoothService.closeConnect();
}
private void resetHandler() {
--
Gitblit v1.8.0