修改了定位数据改变的标记
authorTrillGates <williamtrillgates@gmail.com>
Tue, 2 Nov 2021 08:05:51 +0000 (16:05 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Tue, 2 Nov 2021 08:05:51 +0000 (16:05 +0800)
app/src/main/java/com/ic/protocolSrv/bean/ICLocation.java
app/src/main/java/com/ic/protocolSrv/bean/Runtime.java
app/src/main/java/com/ic/protocolSrv/utils/CellInfoUtil.java

index 4217cef..a3219f3 100644 (file)
@@ -282,8 +282,8 @@ public class ICLocation {
     private String MNC = "0";
     private int LAC = 0;
     private int CID = 0;
-    private int rxlevel = 0;
-    private boolean datachanged = false;
+    private int rxLevel = 0;
+    private boolean dataChanged = false;
 
     private String lastMCC="0";
     private String lastMNC = "0";
@@ -295,12 +295,11 @@ public class ICLocation {
         lastMNC=MNC;
         lastLAC=LAC;
         lastCID=CID;
-        datachanged = false;
     }
     public void setMCC(String mcc) {
         if (!mcc.equals(lastMCC)) {
             MCC = mcc;
-            datachanged = true;
+            dataChanged = true;
         }
     }
 
@@ -308,7 +307,7 @@ public class ICLocation {
        if(!mnc.equals(lastMNC)) {
            ICLogger.d("MNC==> " + mnc);
            MNC = mnc;
-           datachanged = true;
+           dataChanged = true;
        }
     }
 
@@ -316,23 +315,23 @@ public class ICLocation {
         if(lac!=lastLAC) {
             ICLogger.d("LAC==> " + lac);
             LAC = lac;
-            datachanged = true;
+            dataChanged = true;
         }
     }
 
     public void setCID(int cid) {
         if(cid!=lastCID) {
             CID = cid;
-            datachanged = true;
+            dataChanged = true;
         }
     }
 
-    public void setRxlevel(int level) {
-        rxlevel = level;
+    public void setRxLevel(int level) {
+        rxLevel = level;
     }
 
     public boolean isDataChanged() {
-        return datachanged;
+        return dataChanged;
     }
 
     public String getMCC() {
@@ -343,8 +342,8 @@ public class ICLocation {
         return MNC;
     }
 
-    public int getRxlevel() {
-        return rxlevel;
+    public int getRxLevel() {
+        return rxLevel;
     }
 
     public long getLAC() {
index 3788eec..7cf2b84 100644 (file)
@@ -1336,7 +1336,7 @@ public class Runtime {
                 .append(String.format("%1$03d", mnc))
                 .append(String.format("%1$04X", gpsp.getLAC()))
                 .append(String.format("%1$07X", gpsp.getGSMStationCID()))
-                .append(String.format("%1$02X", gpsp.getRxlevel()));
+                .append(String.format("%1$02X", gpsp.getRxLevel()));
         return sb.toString();
     }
 
index b182e9d..cbdd4dd 100644 (file)
@@ -1,12 +1,7 @@
 package com.ic.protocolSrv.utils;
 
 import android.content.Context;
-import android.content.IClipboard;
 import android.os.Build;
-import android.os.Handler;
-import android.os.Message;
-import android.os.PowerManager;
-import android.provider.ContactsContract;
 import android.telephony.CellInfo;
 import android.telephony.CellInfoCdma;
 import android.telephony.CellInfoGsm;
@@ -27,21 +22,14 @@ import android.telephony.gsm.GsmCellLocation;
 //import com.android.internal.telephony.Phone;
 //import com.android.internal.telephony.PhoneFactory;
 import com.ic.protocolSrv.Config;
-import com.ic.protocolSrv.GSensorListener;
-import com.ic.protocolSrv.adapter.LBSHelper;
 import com.ic.protocolSrv.bean.Runtime;
 //import com.sprd.internal.telephony.SprdCallManager;
 
-import java.lang.reflect.Method;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
-import rx.Single;
-import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
-
 public class CellInfoUtil {
 
 
@@ -208,7 +196,7 @@ public class CellInfoUtil {
                     runtime.setCellinfo(gsmSb.toString());
                     runtime.getLocationInstance().setCID(gsmCell.getCid());
                     runtime.getLocationInstance().setLAC(gsmCell.getLac());
-                    runtime.getLocationInstance().setRxlevel(150 - Math.abs(getSignal(telephonyManager, runtime)));
+                    runtime.getLocationInstance().setRxLevel(150 - Math.abs(getSignal(telephonyManager, runtime)));
                     ICLogger.i("LBS GsmCellLocation " + gsmSb.toString());
                     if (Config.LOG_TOFILE) ICLogger.logToFile("LBS", gsmSb.toString());