}
+ private String lastMCC = "";
+ private String lastMnc = "";
+ private long lastLAC = 0l;
+ private long lastCID = 0l;
+
+ private boolean checkLBS() {
+ //获取LBS上一次的数据,与当前的数据进行对比即可
+ //只要有一个是变化的,那么我们就认为是变化了
+ ICLocation locationInstance = runtime.getLocationInstance();
+ String mcc = locationInstance.getMCC();
+ ICLogger.d("mcc==> " + mcc);
+ String mnc = locationInstance.getMNC();
+ ICLogger.d("mnc==> " + mnc);
+ long lac = locationInstance.getLAC();
+ ICLogger.d("lac==> " + lac);
+ long gsmStationCID = locationInstance.getGSMStationCID();
+ ICLogger.d("gsmStationCID==> " + gsmStationCID);
+ //判断跟上一次的是否一样,如果一样的话就没有变化
+ //如果变了,那么就返回true
+ ICLogger.d("last ==> lastMCC " + lastMCC + " lastMnc ==> " +
+ lastMnc + " lastLAC ==> " + lastLAC + " lastCID " + lastCID);
+ boolean result = false;
+ if (!lastMCC.equals(mcc) || !lastMnc.equals(mnc) || lastCID != gsmStationCID || lastLAC != lac) {
+ result = true;
+ }
+ //更新值
+ lastMnc = mnc;
+ lastMCC = mcc;
+ lastLAC = lac;
+ lastCID = gsmStationCID;
+ return result;
+ }
+
/***
*noMove and timeout return true
* else return false
*/
private boolean checkNoMoveTimeout() {
+ //如果LBS变化了,我们就认为位置改变了
+ if (checkLBS()) {
+ ICLogger.d("ON LBS CHANGE...");
+ return false;
+ }
noMove = (runtime.getTotalStepCount() - runtime.getLastStepCount() <= 0);
runtime.updateFZDDevStatusMoving(!noMove); //设置当前运动状态
ICLogger.i("checkNoMoveTimeout last_noMove " + last_noMove + " noMove " + noMove + " lastStepCount " + runtime.getLastStepCount() + " StepCount " + runtime.getTotalStepCount());