From 6656832db5567fcb3e358654708cb4fa2f13bef4 Mon Sep 17 00:00:00 2001 From: TrillGates Date: Mon, 7 Mar 2022 14:38:01 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E4=BD=8D=E4=B8=8A?= =?utf8?q?=E4=BC=A0=E9=80=BB=E8=BE=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../enqualcomm/support/LocationClient.java | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/com/enqualcomm/support/LocationClient.java b/app/src/main/java/com/enqualcomm/support/LocationClient.java index 9e081232..f2d29ad4 100644 --- a/app/src/main/java/com/enqualcomm/support/LocationClient.java +++ b/app/src/main/java/com/enqualcomm/support/LocationClient.java @@ -587,9 +587,7 @@ public class LocationClient { private static boolean needCheckAgain = false; public void waitAndSendLocation() { - this.mLbsHelper.getWifiResult(); - long timeCost = 0L; wifi_ok = false; gps_ok = false; @@ -653,18 +651,11 @@ public class LocationClient { startSOSLocation = false; } - if (startNomalLocation = true) { + ICLogger.d("startNomalLocation =-=> " + startNomalLocation); + if (startNomalLocation) { startNomalLocation = false; - if (gps_ok) { - if (!TextUtils.isEmpty(runtime.getWifiInfo())) { - StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime); - DeliverMessage(AP01_CMD); - } - } else { - StringMessage AP02_CMD = protocolAPIHelper.getLBSLocationMSG(runtime); - DeliverMessage(AP02_CMD); - } - + StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime); + DeliverMessage(AP01_CMD); } stopCheckLocationResult(); String msg = "Location Fixed Type " + runtime.getLocationInstance().getLocationType() + " at " + runtime.getLocationInstance().getLocationTime() + " timeout " + timeout; @@ -713,16 +704,16 @@ public class LocationClient { runtime.getLocationInstance().setLocationType(locationtype); runtime.getLocationInstance().setLocationTime(TimeUtil.getSystemTime3()); - if (startSOSLocation == true) { + if (startSOSLocation) { StringMessage AP10_CMD = protocolAPIHelper.getWarningMSG(runtime); DeliverMessage(AP10_CMD); runtime.setAlarmType(Runtime.AlarmType.ALARM_REMOVE_SOS); startSOSLocation = false; } - if (startNomalLocation = true) { + if (startNomalLocation) { startNomalLocation = false; - StringMessage AP02_CMD = protocolAPIHelper.getLBSLocationMSG(runtime); - DeliverMessage(AP02_CMD); + StringMessage AP01_CMD = protocolAPIHelper.getLBSLocationMSG(runtime); + DeliverMessage(AP01_CMD); } stopCheckLocationResult(); String msg = "Location Fixed Type " + runtime.getLocationInstance().getLocationType() + " at " + runtime.getLocationInstance().getLocationTime() + " timeout " + timeout; -- 2.17.1