Commit bc17a3c75dd2fe65a6fbff4efe809d8e1c0c5ce9

Authored by 李攀
1 parent 613f630d

version udpate,some log ,reconnect

@@ -11,8 +11,8 @@ def isWindows = { @@ -11,8 +11,8 @@ def isWindows = {
11 } 11 }
12 12
13 ext { 13 ext {
14 - APP_VERSION_CODE = 4;  
15 - APP_VERSION_NAME = "v2.1-0603"; 14 + APP_VERSION_CODE = 5;
  15 + APP_VERSION_NAME = "v2.2-0606";
16 } 16 }
17 17
18 android { 18 android {
@@ -44,7 +44,7 @@ import static com.qnbar.smc.service.SocketService.USER_OPEN_DOOR_AND_GET_MOVIE; @@ -44,7 +44,7 @@ import static com.qnbar.smc.service.SocketService.USER_OPEN_DOOR_AND_GET_MOVIE;
44 public class SocketService1 extends BaseService { 44 public class SocketService1 extends BaseService {
45 private static final String TAG = "BackService1"; 45 private static final String TAG = "BackService1";
46 private static final long HEART_BEAT_RATE = 2 * 1000; 46 private static final long HEART_BEAT_RATE = 2 * 1000;
47 - private final long READ_THREAD_DEFAULT_SLEEP_MTIME = 1000; 47 + private final long READ_THREAD_DEFAULT_SLEEP_MTIME = 100;
48 48
49 // public static final int USER_OPEN_DOOR_AND_GET_MOVIE = 1703; 49 // public static final int USER_OPEN_DOOR_AND_GET_MOVIE = 1703;
50 /* 50 /*
@@ -22,6 +22,7 @@ import android.os.IBinder; @@ -22,6 +22,7 @@ import android.os.IBinder;
22 import android.util.Log; 22 import android.util.Log;
23 import com.gimi.common.cinema.model.Constant; 23 import com.gimi.common.cinema.model.Constant;
24 import com.gimi.common.cinema.model.MessageEvent; 24 import com.gimi.common.cinema.model.MessageEvent;
  25 +import com.gimi.common.cinema.utils.LogUtils;
25 import org.greenrobot.eventbus.EventBus; 26 import org.greenrobot.eventbus.EventBus;
26 27
27 import static com.gimi.common.cinema.model.Constant.count; 28 import static com.gimi.common.cinema.model.Constant.count;
@@ -41,7 +42,7 @@ public class CountService extends Service { @@ -41,7 +42,7 @@ public class CountService extends Service {
41 @Override 42 @Override
42 public int onStartCommand(Intent intent, int flags, int startId) { 43 public int onStartCommand(Intent intent, int flags, int startId) {
43 // count = intent.getIntExtra("countDown", 0); 44 // count = intent.getIntExtra("countDown", 0);
44 - Log.d(TAG, "count is :" + count); 45 + LogUtils.d(TAG, "count is :" + count);
45 if (Constant.count > 0) { 46 if (Constant.count > 0) {
46 Log.d(TAG, "if"); 47 Log.d(TAG, "if");
47 new CountDownThread().start(); 48 new CountDownThread().start();
@@ -55,7 +56,7 @@ public class CountService extends Service { @@ -55,7 +56,7 @@ public class CountService extends Service {
55 class CountDownThread extends Thread { 56 class CountDownThread extends Thread {
56 @Override 57 @Override
57 public void run() { 58 public void run() {
58 - Log.d(TAG, "Polling..."); 59 + LogUtils.d(TAG, "Polling...");
59 //if true restart AskService polling 60 //if true restart AskService polling
60 if (count-- <= 1) { 61 if (count-- <= 1) {
61 MessageEvent messageEvent = new MessageEvent(); 62 MessageEvent messageEvent = new MessageEvent();
@@ -70,7 +71,7 @@ public class CountService extends Service { @@ -70,7 +71,7 @@ public class CountService extends Service {
70 71
71 @Override 72 @Override
72 public void onDestroy() { 73 public void onDestroy() {
73 - Log.d(TAG, "Service:onDestroy"); 74 + LogUtils.d(TAG, "Service:onDestroy");
74 System.out.println("Service:onDestroy"); 75 System.out.println("Service:onDestroy");
75 super.onDestroy(); 76 super.onDestroy();
76 } 77 }
Please register or login to post a comment