release IcL02WorkService V54 202008251037
authorsnickersun <scy@incartech.cn>
Tue, 25 Aug 2020 02:43:21 +0000 (10:43 +0800)
committersnickersun <scy@incartech.cn>
Tue, 25 Aug 2020 02:43:21 +0000 (10:43 +0800)
H88 项目用,解决资源冲突造成的 测温线程无法退出的问题。

app/IcL02WorkService/release/IcL02WorkService_V54_202008251037_release.apk [new file with mode: 0644]
app/src/main/java/com/ic/work/WorkService.java

diff --git a/app/IcL02WorkService/release/IcL02WorkService_V54_202008251037_release.apk b/app/IcL02WorkService/release/IcL02WorkService_V54_202008251037_release.apk
new file mode 100644 (file)
index 0000000..63fbbef
Binary files /dev/null and b/app/IcL02WorkService/release/IcL02WorkService_V54_202008251037_release.apk differ
index 1e347c8..fcdc064 100644 (file)
@@ -54,6 +54,8 @@ import org.threeten.bp.Duration;
 import org.threeten.bp.LocalDateTime;
 import org.threeten.bp.ZoneId;
 
+import java.util.Observable;
+
 public class WorkService extends Service {
 
     private static final String TAG = "WorkService";
@@ -73,11 +75,11 @@ public class WorkService extends Service {
     private static final String TXT_ACTION = "action.ic.srvPushTxt";
     private static final String TYPE_KEY = "msgType";
     private static final String MSG_KEY = "txtMsg";
-
-    private WeatherProcess weatherProcess;
     private BloodProcess bloodProcess;
     private PedProcess pedProcess;
     private TempProcess tempProcess;
+
+    private WeatherProcess weatherProcess;
     private AkProcess akProcess;
 
     private WeatherHelper mWeatherHelper;
@@ -384,7 +386,8 @@ public class WorkService extends Service {
                 }
                 switch (acyion) {
                     case GET_PED_ACTION:
-                        ThreadPoolManager.getInstance().execute(new PedRunnable(mApp.getApplicationContext(), mApp.getRepository()));
+                        //ThreadPoolManager.getInstance().execute(new PedRunnable(mApp.getApplicationContext(), mApp.getRepository()));
+                        new Thread(new PedRunnable(mApp.getApplicationContext(), mApp.getRepository())).start();
                         break;
                     case Intent.ACTION_TIMEZONE_CHANGED:
                         mWeatherHelper.startLocation(getApplicationContext());