release ICL02ProtocolV2 V742
authorsnickersun <scy@incartech.cn>
Tue, 29 Dec 2020 08:58:34 +0000 (16:58 +0800)
committersnickersun <scy@incartech.cn>
Tue, 29 Dec 2020 08:58:34 +0000 (16:58 +0800)
1、把所有的handler都替换为 在子线程执行,优化执行效率,减少阻塞主线程的可能。
2、sms接收取消静态注册。

15 files changed:
app/release/ICSer_V742_2012291656_release.apk [new file with mode: 0644]
app/release/output.json
app/src/main/AndroidManifest.xml
app/src/main/java/com/enqualcomm/support/Constants.java
app/src/main/java/com/enqualcomm/support/ICSmsManager.java
app/src/main/java/com/enqualcomm/support/LocationClient.java
app/src/main/java/com/enqualcomm/support/NMEAListener.java
app/src/main/java/com/enqualcomm/support/adapter/BTHelper.java
app/src/main/java/com/enqualcomm/support/utils/DBHelper.java
app/src/main/java/com/enqualcomm/support/utils/LanguageUtils.java
app/src/main/java/com/enqualcomm/support/utils/NettyConnection.java
app/src/main/java/com/ic/protocols/protocol_ic.java
app/src/main/java/se/wetcat/qatja/android/QatjaService.java
app/version_code.properties
local.properties

diff --git a/app/release/ICSer_V742_2012291656_release.apk b/app/release/ICSer_V742_2012291656_release.apk
new file mode 100644 (file)
index 0000000..c41ec58
Binary files /dev/null and b/app/release/ICSer_V742_2012291656_release.apk differ
index 0ad8109..89bbb91 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":740,"versionName":"2012281508","enabled":true,"outputFile":"ICSer_V740_2012281508_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V740_2012281508_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":742,"versionName":"2012291656","enabled":true,"outputFile":"ICSer_V742_2012291656_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V742_2012291656_release.apk","properties":{}}]
\ No newline at end of file
index 60a1fa5..19d2f54 100644 (file)
             android:authorities="com.enqualcomm.support"
             android:exported="true" />
 
-        <receiver
-            android:name=".ICSmsManager"
-            android:exported="true">
-            <intent-filter>
-                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
-                <action android:name="com.enqualcomm.support.SMSCMD" />
-                <action android:name="com.ic.action.internaltest" />
-            </intent-filter>
-        </receiver>
+<!--        <receiver-->
+<!--            android:name=".ICSmsManager"-->
+<!--            android:exported="true">-->
+<!--            <intent-filter>-->
+<!--                <action android:name="android.provider.Telephony.SMS_RECEIVED" />-->
+<!--                <action android:name="com.enqualcomm.support.SMSCMD" />-->
+<!--                <action android:name="com.ic.action.internaltest" />-->
+<!--            </intent-filter>-->
+<!--        </receiver>-->
         <receiver
             android:name=".BootCompleteReceiver"
             android:exported="true">
index e4bfc3b..cd2d7ab 100644 (file)
@@ -255,6 +255,8 @@ public interface Constants {
   public static final  String ACTION_START_FOTA_UPDATE="com.ic.action.startfotaUpdate";
   public static final String ACTION_SMSCMD="com.enqualcomm.support.SMSCMD";
   public static final String ACTION_SMSCMD_Reply="com.ic.action.fotaUpdateReply";
+  public static final String ACTION_TINTERNAL_TEST="com.ic.action.internaltest";
+
   public static final String KeyReplyData="reply";
 
   public static final String ACTION_SMSCMD_TEST="com.ic.action.internaltest";
index 374b5e2..54e2dc8 100644 (file)
@@ -10,6 +10,7 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.Message;
 import android.os.SystemClock;
 import android.telephony.SmsMessage;
@@ -54,6 +55,7 @@ import static com.enqualcomm.support.Constants.ACTION_SMSCMD_Reply;
 import static com.enqualcomm.support.Constants.ACTION_SMSCMD_TEST;
 import static com.enqualcomm.support.Constants.ACTION_SMS_RECEIVED;
 import static com.enqualcomm.support.Constants.ACTION_START_FOTA_UPDATE;
+import static com.enqualcomm.support.Constants.ACTION_TINTERNAL_TEST;
 import static com.enqualcomm.support.Constants.KeyReplyData;
 import static com.enqualcomm.support.utils.SimSignalUtil.send_at_cmd;
 import static com.enqualcomm.support.utils.SimSignalUtil.send_at_setImei0;
@@ -82,7 +84,6 @@ public class ICSmsManager extends BroadcastReceiver {
         mContext = context;
         runtime = CoreService.getInstance().runtime;
 
-
         String action = intent.getAction();
         ICLogger.i(" onReceive Action " + action);
         if (ACTION_SMSCMD.equals(action)) {
@@ -150,9 +151,15 @@ public class ICSmsManager extends BroadcastReceiver {
         this.mContext = runtime.getContextProxy().context;
         IntentFilter intentfilter = new IntentFilter();
         intentfilter.addAction(ACTION_SMSCMD_Reply);
-        this.mContext.registerReceiver(this, intentfilter);
+        intentfilter.addAction(ACTION_SMS_RECEIVED);
+        intentfilter.addAction(ACTION_SMSCMD);
+        intentfilter.addAction(ACTION_TINTERNAL_TEST);
+        mContext.registerReceiver(this, intentfilter);
+        ICLogger.i("ICSmsManager register filter ");
 //        registerSmsDatabaseChangeObserver(mContext);
-        mHandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper(), new Handler.Callback() {
+        HandlerThread handlerThread = new HandlerThread("ic:SMS-thread");
+        handlerThread.start();
+        mHandler = new Handler(handlerThread.getLooper(), new Handler.Callback() {
             @Override
             public boolean handleMessage(Message message) {
                 switch (message.what) {
@@ -180,17 +187,21 @@ public class ICSmsManager extends BroadcastReceiver {
                     }
                     break;
                     case 0:
-                        //  sendSMS(phonenumber, "Upload  Failed!");
-                        //  if (needshowToast) {
-                        Util.ShowToast(runtime, "Upload cmd  Failed!");
-                        //  }
+                        sendSMS(cell_number_to_reply, "Upload  Failed!");
+                        cell_number_to_reply="";
+                        if (needshowToast) {
+                            Util.ShowToast(runtime, "Upload cmd  Failed!");
+                            needshowToast=false;
+                        }
                         break;
 
                     case 1:
-                        //  sendSMS(phonenumber, "Upload  success!");
-                        //   if (needshowToast) {
-                        Util.ShowToast(runtime, "Upload cmd  success!");
-                        //  }
+                        sendSMS(cell_number_to_reply, "Upload  success!");
+                        cell_number_to_reply="";
+                        if (needshowToast) {
+                            Util.ShowToast(runtime, "Upload cmd  success!");
+                            needshowToast=false;
+                        }
                         break;
                 }
                 return false;
@@ -563,7 +574,7 @@ public class ICSmsManager extends BroadcastReceiver {
             } else if (sms.startsWith(ENCRYPED_HEADER + "#logctl#=")) {
 
                 needshowToast = sms.contains("SDLogInfo:");
-
+                cell_number_to_reply = phonenumber;
                 String tmp[] = sms.split("=");
                 if (tmp.length == 2) {
                     if (tmp[1].equals("current")) {
@@ -589,51 +600,18 @@ public class ICSmsManager extends BroadcastReceiver {
                                         @Override
                                         public void run() {
                                             String filepath = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + fileOrDir;
-                                            URL serverurl = null;
-                                            try {
-                                                serverurl = new URL(Util.getServerLogfilePath(Config.getFtpServer(mContext), TimeUtil.getSystemTime3(), logfile, runtime));
-                                            } catch (MalformedURLException e) {
-                                                e.printStackTrace();
-                                                ICLogger.e(e.getMessage(), e);
-                                            }
                                             if (new File(filepath).exists()) {
                                                 Util.getDBFile();
                                                 sendSMS(phonenumber, "start Upload " + filepath + " to " + Config.getFtpServer(mContext) + " ...");
 
-                                                if (logfile.startsWith("SDLogInfo:")) {
+                                                if (needshowToast) {
                                                     Util.ShowToast(runtime, "start Upload " + filepath + " to " + Config.getFtpServer(mContext) + " ...");
                                                 }
                                                 String logtime = TimeUtil.getSystemTime3();
-
-                                                if (upload_logs_via_ftp) {
-                                                    if (ftpUtils.upload(serverurl, Config.getFtpUser(mContext), Config.getFtpPWD(mContext), new File(filepath))) {
-                                                        sendSMS(phonenumber, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " success!");
-
-                                                        if (logfile.startsWith("SDLogInfo:")) {
-                                                            Util.ShowToast(runtime, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " success!");
-                                                        }
-                                                    } else {
-                                                        sendSMS(phonenumber, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " failed!");
-                                                        if (logfile.startsWith("SDLogInfo:")) {
-                                                            Util.ShowToast(runtime, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " failed!");
-                                                        }
-                                                    }
-                                                } else {
-                                                    if (ICHttpUtil.uploadFile(filepath, runtime, logtime, mHandler)) {
-//                                                        sendSMS(phonenumber, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " success!");
-//                                                        if (logfile.startsWith("SDLogInfo:")){
-//                                                            Util.ShowToast(runtime,"Upload " + filepath + " to " + Config.getFtpServer(mContext) + " success!");
-//                                                        }
-                                                    } else {
-//                                                        sendSMS(phonenumber, "Upload " + filepath + " to " + Config.getFtpServer(mContext) + " failed!");
-//                                                        if (logfile.startsWith("SDLogInfo:")){
-//                                                            Util.ShowToast(runtime,"Upload " + filepath + " to " + Config.getFtpServer(mContext) + " failed!");
-//                                                        }
-                                                    }
-                                                }
+                                                ICHttpUtil.uploadFile(filepath, runtime, logtime, mHandler);
                                             } else {
                                                 sendSMS(phonenumber, filepath + " not exist !");
-                                                if (logfile.startsWith("SDLogInfo:")) {
+                                                if (needshowToast) {
                                                     Util.ShowToast(runtime, filepath + " not exist !");
                                                 }
                                             }
@@ -649,31 +627,11 @@ public class ICSmsManager extends BroadcastReceiver {
                                     @Override
                                     public void run() {
                                         String filepath = Util.getLogfilePath(runtime, logfile);
-                                        URL serverurl = null;
-                                        try {
-                                            serverurl = new URL(Util.getServerLogfilePath(Config.getFtpServer(mContext), TimeUtil.getSystemTime3(), logfile, runtime));
-                                        } catch (MalformedURLException e) {
-                                            e.printStackTrace();
-                                            ICLogger.e(e.getMessage(), e);
-                                        }
                                         if (Util.LogfileExist(runtime, logfile)) {
                                             Util.getDBFile();
                                             sendSMS(phonenumber, "start Upload " + logfile + " to " + Config.getFtpServer(mContext) + " ...");
                                             String logtime = TimeUtil.getSystemTime3();
-
-                                            if (upload_logs_via_ftp) {
-                                                if (ftpUtils.upload(serverurl, Config.getFtpUser(mContext), Config.getFtpPWD(mContext), new File(filepath))) {
-                                                    sendSMS(phonenumber, "Upload " + logfile + " to " + Config.getFtpServer(mContext) + " success!");
-                                                } else {
-                                                    sendSMS(phonenumber, "Upload " + logfile + " to " + Config.getFtpServer(mContext) + " failed!");
-                                                }
-                                            } else {
-                                                if (ICHttpUtil.uploadFile(filepath, runtime, logtime, mHandler)) {
-//                                                    sendSMS(phonenumber, "Upload " + logfile + " to " + Config.getFtpServer(mContext) + " success!");
-                                                } else {
-//                                                    sendSMS(phonenumber, "Upload " + logfile + " to " + Config.getFtpServer(mContext) + " failed!");
-                                                }
-                                            }
+                                            ICHttpUtil.uploadFile(filepath, runtime, logtime, mHandler);
                                         } else {
                                             sendSMS(phonenumber, logfile + " not exist !");
                                         }
@@ -682,8 +640,6 @@ public class ICSmsManager extends BroadcastReceiver {
 
                             }
 
-//                            sendSMS(phonenumber, "upload FtpLogServer to " + Config.getFtpServer(mContext) + ", user " + Config.getFtpUser(mContext) + ", pwd " + Config.getFtpPWD(mContext));
-
                         } else {
                             sendSMS(phonenumber, "upload logfile format error!");
                         }
index bdcb663..79c9137 100644 (file)
@@ -5,6 +5,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.Message;
 import android.os.PowerManager;
 import android.os.SystemClock;
@@ -305,8 +306,9 @@ public class LocationClient {
                 }
             }
         });
-
-        mhandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper(), locationCallback);
+        HandlerThread handlerThread = new HandlerThread("ic:location-thread");
+        handlerThread.start();
+        mhandler = new Handler(handlerThread.getLooper(), locationCallback);
         btHelper.setBLEScanTimeout(OneBLEScanTimeOUT);
         gLocationCline = this;
         //GPS 监听管理初始化
index d44f80f..c242bbe 100644 (file)
@@ -7,6 +7,7 @@ import android.location.LocationListener;
 import android.location.LocationManager;
 import android.os.Bundle;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.provider.Settings;
 
 import com.enqualcomm.support.bean.EventLooperHandlerThread;
@@ -96,8 +97,9 @@ public class NMEAListener implements NmeaListener, LocationListener {
     public NMEAListener(LocationManager paramLocationManager, Runtime paramRuntime) {
         this.locationManager = paramLocationManager;
         this.runtime = paramRuntime;
-
-        temHandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper(), message -> {
+        HandlerThread handlerThread = new HandlerThread("ic:nmea-thread");
+        handlerThread.start();
+        temHandler = new Handler(handlerThread.getLooper(), message -> {
 
             if (message.what == MSG_WHAT_GPS_TIMEOUT || message.what == MSG_WHAT_GPS_NOSTAR) {
                 //no start
index 23a2654..bc079fd 100644 (file)
@@ -101,7 +101,9 @@ public class BTHelper {
         if (lecallback == null)
             lecallback = new BLeScanCallback();
         if (mHandler == null) {
-            mHandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper());
+            HandlerThread handlerThread = new HandlerThread("ic:BT-thread");
+            handlerThread.start();
+            mHandler = new Handler(handlerThread.getLooper());
         }
 
     }
@@ -146,7 +148,9 @@ public class BTHelper {
             if (lecallback == null)
                 lecallback = new BLeScanCallback();
             if (mHandler == null) {
-                mHandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper());
+                HandlerThread handlerThread = new HandlerThread("ic:BT-thread");
+                handlerThread.start();
+                mHandler = new Handler(handlerThread.getLooper());
             }
             mBtAdapter.startLeScan(lecallback);
             mHandler.postDelayed(mRunable_stopBleScan, BLETimeoutForOneScan * 1000);
index f74f418..619f1f5 100644 (file)
@@ -34,10 +34,6 @@ import com.enqualcomm.support.bean.Weather;
 import java.util.ArrayList;
 import java.util.Iterator;
 
-import rx.Observable;
-import rx.Subscriber;
-import rx.schedulers.Schedulers;
-
 import static com.enqualcomm.support.Constants.ACTION_ALARM_ALARM_CHANGE;
 import static com.enqualcomm.support.Constants.ACTION_ANTIOFF_ALARM_CHANGE;
 import static com.enqualcomm.support.bean.Contact.CATEGORY_ADMIN;
@@ -69,26 +65,27 @@ public class DBHelper {
      * @param resolver
      */
     private void addAllContact(ArrayList<Contact> contactArray, ContentResolver resolver) {
-        Observable.create(subscriber -> {
-            Iterator contactIT = contactArray.iterator();
-            while (contactIT.hasNext()) {
-                Contact contact = (Contact) contactIT.next();
-                ContentValues contentvalues = new ContentValues();
-                long raw_contactID = ContentUris.parseId(resolver.insert(RawContacts.CONTENT_URI, contentvalues));
-                contentvalues.clear();
-                contentvalues.put("raw_contact_id", raw_contactID);
-                contentvalues.put("mimetype", "vnd.android.cursor.item/name");
-                contentvalues.put("data2", contact.name);
-                resolver.insert(Data.CONTENT_URI, contentvalues);
-                contentvalues.clear();
-                contentvalues.put("raw_contact_id", raw_contactID);
-                contentvalues.put("mimetype", "vnd.android.cursor.item/phone_v2");
-                contentvalues.put("data1", contact.number);
-                contentvalues.put("data2", 2);
-                resolver.insert(Data.CONTENT_URI, contentvalues);
-                contentvalues.clear();
-            }
-        }).subscribeOn(Schedulers.io()).subscribe();
+        Iterator contactIT = contactArray.iterator();
+        while (contactIT.hasNext()) {
+            Contact contact = (Contact) contactIT.next();
+            ContentValues contentvalues = new ContentValues();
+            long raw_contactID = ContentUris.parseId(resolver.insert(RawContacts.CONTENT_URI, contentvalues));
+            contentvalues.clear();
+            contentvalues.put("raw_contact_id", raw_contactID);
+            contentvalues.put("mimetype", "vnd.android.cursor.item/name");
+            contentvalues.put("data2", contact.name);
+            resolver.insert(Data.CONTENT_URI, contentvalues);
+            contentvalues.clear();
+            contentvalues.put("raw_contact_id", raw_contactID);
+            contentvalues.put("mimetype", "vnd.android.cursor.item/phone_v2");
+            contentvalues.put("data1", contact.number);
+            contentvalues.put("data2", 2);
+            resolver.insert(Data.CONTENT_URI, contentvalues);
+            contentvalues.clear();
+
+        }
+        ICLogger.i("addAllContact done");
+
     }
 
     /**
@@ -117,14 +114,12 @@ public class DBHelper {
      * @param resolver
      */
     private void deleteAllContact(ArrayList<Contact> contactArrayList, String where, ContentResolver resolver) {
-        Observable.create(subscriber -> {
-            String sb = "where=" + where;
-            ICLogger.i(sb);
-            for (Contact contact : contactArrayList) {
-                deleteContactId(resolver, contact.name);
-            }
-            resolver.delete(ICContentProvider.CONTACT_URI, where, null);
-        }).subscribeOn(Schedulers.io()).subscribe();
+        String sb = "where=" + where;
+        ICLogger.i(sb);
+        for (Contact contact : contactArrayList) {
+            deleteContactId(resolver, contact.name);
+        }
+        resolver.delete(ICContentProvider.CONTACT_URI, where, null);
     }
 
     private Uri insertDownLoadInfo(String var1, int var2, int var3, String var4) {
@@ -197,7 +192,8 @@ public class DBHelper {
                     ICLogger.i(log1.toString());
                 }
 
-                this.cr.bulkInsert(ICContentProvider.CONTACT_URI, contentlist);
+                int rows=this.cr.bulkInsert(ICContentProvider.CONTACT_URI, contentlist);
+                ICLogger.i("Create rows "+rows);
                 this.addAllContact(contactArray, this.cr);
             }
 
@@ -991,18 +987,13 @@ public class DBHelper {
      * @param si
      */
     public void updateSleepInfo(SleepInfo si) {
-        Observable.create(new Observable.OnSubscribe<Object>() {
-            @Override
-            public void call(Subscriber<? super Object> subscriber) {
-                /*计算后的分值,每天会在睡眠结束后计算Records获得*/
-                ContentValues values = new ContentValues();
-                values.put("DATE", si.getCurrentDate());
-                values.put("DEEP_SLEEP", si.getDeepsleep_minutes());
-                values.put("LIGHT_SLEEP", si.getLightsleep_minutes());
-                values.put("SCORE", si.getScore());
-                cr.insert(ICContentProvider.SLEEP_STATUS_URI, values);
-            }
-        }).subscribeOn(Schedulers.io()).subscribe();
+        /*计算后的分值,每天会在睡眠结束后计算Records获得*/
+        ContentValues values = new ContentValues();
+        values.put("DATE", si.getCurrentDate());
+        values.put("DEEP_SLEEP", si.getDeepsleep_minutes());
+        values.put("LIGHT_SLEEP", si.getLightsleep_minutes());
+        values.put("SCORE", si.getScore());
+        cr.insert(ICContentProvider.SLEEP_STATUS_URI, values);
     }
 
 
index 80e8c7f..88ef6f1 100644 (file)
@@ -14,7 +14,7 @@ public class LanguageUtils {
     private static String language = "zh-cn";
     public static String getCurrentLanguage(){
        ICLogger.i(" get Current language "+Locale.getDefault().getDisplayLanguage());
-        return language;
+        return Locale.getDefault().getLanguage();
     }
 
 
index 85e4a1d..b544795 100644 (file)
@@ -2,6 +2,7 @@ package com.enqualcomm.support.utils;
 
 import android.os.Bundle;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.Message;
 import android.os.SystemClock;
 import android.util.Log;
@@ -36,8 +37,9 @@ public class NettyConnection implements Connection {
     public NettyConnection(ConnectionListener paramConnectionListener, Runtime runtime) {
         Log.i(TAG, "NettyConnection ");
         this.listener = paramConnectionListener;
-
-        mHandler = new Handler(EventLooperHandlerThread.getInstance().makeLooper(), new Handler.Callback() {
+        HandlerThread handlerThread = new HandlerThread("ic:netty-handler-thread");
+        handlerThread.start();
+        mHandler = new Handler(handlerThread.getLooper(), new Handler.Callback() {
             @Override
             public boolean handleMessage(Message message) {
 
index 01494c3..4994478 100644 (file)
@@ -294,7 +294,7 @@ public class protocol_ic {
 
     public protocol_ic(Connection connect, Runtime runtime) {
         if (mHandler == null) {
-            HandlerThread handlerThread = new HandlerThread("ic:protocol-handler-thread");
+            HandlerThread handlerThread = new HandlerThread("ic:protocol_ic-handler-thread");
             handlerThread.start();
             mHandler = new Handler(handlerThread.getLooper());
         }
index 237f7a0..5b37af5 100644 (file)
@@ -21,6 +21,7 @@ import android.content.Intent;
 import android.os.AsyncTask;
 import android.os.Binder;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.IBinder;
 import android.text.TextUtils;
 
@@ -140,6 +141,8 @@ public class QatjaService extends Service {
   /**
    *
    */
+  HandlerThread handlerThread = new HandlerThread("ic:mqttsrv-handler-thread");
+
   private Handler mHandler = null;
 
   /**
@@ -188,7 +191,10 @@ public class QatjaService extends Service {
   private MQTTIdentifierHelper mMqttIdentifierHelper;
 
   private boolean doAutomaticReconnect = false;
-  private Handler reconnectHandler = new Handler();
+
+
+
+  private Handler reconnectHandler ;
   private Runnable recoonectRunnable = new Runnable() {
     @Override
     public void run() {
@@ -219,6 +225,9 @@ public class QatjaService extends Service {
     if (DEBUG)
       ICLogger.i( "onCreate");
 
+    handlerThread.start();
+    reconnectHandler = new Handler(handlerThread.getLooper());
+
     subscribedTopics = new HashSet<>();
 
     mMqttIdentifierHelper = new MQTTIdentifierHelper();
@@ -740,7 +749,8 @@ public class QatjaService extends Service {
     mConnectedThread.start();
 
     // Start the PINGREQ handler
-    mKeepaliveHandler = new Handler(getMainLooper());
+
+    mKeepaliveHandler = new Handler(handlerThread.getLooper());//new Handler(getMainLooper());
     mKeepaliveHandler.postDelayed(mPingSender, KEEP_ALIVE_TIMER*1000);
 
     ICLogger.i( "Sending connect message");
index a5b91ff..4a12822 100644 (file)
@@ -1,2 +1,2 @@
-#Fri Dec 25 12:47:34 CST 2020
-VERSION_CODE=739
+#Tue Dec 29 16:56:28 CST 2020
+VERSION_CODE=742
index 5a44ca6..a202436 100644 (file)
@@ -4,5 +4,5 @@
 # Location of the SDK. This is only used by Gradle.
 # For customization when using a Version Control System, please read the
 # header note.
-#Tue Dec 29 09:16:53 CST 2020
-sdk.dir=D\:\\Android\\Sdk
+#Tue Dec 29 14:56:41 CST 2020
+sdk.dir=C\:\\Users\\incar\\AppData\\Local\\Android\\Sdk