if (CoreService.is_wifi_network_ok) {\r
CoreService.is_wifi_network_ok = false;\r
/*屏幕亮起时,如果wifi用户设置是开启的,则开启wifi*/\r
- Util.turnOnWifiForConnect(runtime.getContextProxy().context, runtime);\r
+// ICLogger.i("turnOnWifiForConnect");\r
+// if (!Util.isWifiIsOpen(runtime.getContextProxy().context,runtime))\r
+// Util.turnOnWifiForConnect(runtime.getContextProxy().context, runtime);\r
}\r
} else if ("android.intent.action.SCREEN_OFF".equals(param1Intent.getAction()) && Util.isWifiIsOpen(runtime.getContextProxy().context,runtime)) {\r
// CoreService.is_wifi_network_ok = true;\r
if (!runtime.isNoTurnOffWifiOnScreenOff()) {\r
//不关闭wifi when ScreenOff\r
- Util.turnOffWifiForSleep(runtime.getContextProxy().context, runtime);\r
+ ICLogger.i("turnOffWifiForConnect");\r
+// if (Util.isWifiIsOpen(runtime.getContextProxy().context,runtime))\r
+// Util.turnOffWifiForSleep(runtime.getContextProxy().context, runtime);\r
}\r
}\r
}\r
\r
} else {\r
ICLogger.i("GPS is still listening, skip open it!");\r
+ runtime.getLocationInstance().setLocationStat(ICLocation.LOCATION_STAT.LOCATION_OPEN); //此处为了检测是否定位时可以正确识别状态,以防一直处于GPS定位成功状态\r
if (Config.LOG_TOFILE) ICLogger.logToFile("GPS", "GPS is still listening, skip open it!");\r
}\r
}else{\r
}\r
break;\r
}\r
-\r
- if(needCheckAgain)\r
- AlarmHelper.setRealTimeAlarmInSeconds(runtime.getContextProxy().context,1,ACTION_CHECK_LOCATION_RESULT);\r
+ ICLogger.i("needCheckAgain "+needCheckAgain);\r
+ if(needCheckAgain) {\r
+ AlarmHelper.setRealTimeAlarmInSeconds(runtime.getContextProxy().context, 1, ACTION_CHECK_LOCATION_RESULT);\r
+ }\r
}\r
\r
public void stopCheckLocationResult(){\r
\r
break;\r
}\r
-\r
startCheckResult();\r
}\r
\r
if (this.listening == false) {\r
Settings.Secure.setLocationProviderEnabled(runtime.getContextProxy().getResolver(), GPS_PROVIDER, true);\r
\r
+ runtime.getLocationInstance().setLocationStat(ICLocation.LOCATION_STAT.LOCATION_OPEN);\r
\r
Criteria criteria = new Criteria();\r
criteria.setAccuracy(Criteria.ACCURACY_FINE);// 设置为最大精度\r
return true;//gpsHotStart();\r
} else {\r
ICLogger.i(" location listening, skip !");\r
+\r
+ runtime.getLocationInstance().setLocationStat(ICLocation.LOCATION_STAT.LOCATION_SEARCHING);\r
+\r
if (Config.LOG_TOFILE) ICLogger.logToFile("GPS", " location listening, skip !");\r
\r
return true;\r