Commit 291ab8460592e00f363ba5f3776a5096026e19ed

Authored by 潘钊
1 parent 3ac00f1a

update..

src/main/java/com/bsth/entity/GpsEntity.java
... ... @@ -82,9 +82,9 @@ public class GpsEntity {
82 82 if(StringUtils.isBlank(basicInfo.getDeviceId()))
83 83 return null;
84 84  
85   - byte cacheData = getCacheState(basicInfo.getServiceState());
  85 +/* byte cacheData = getCacheState(basicInfo.getServiceState());
86 86 if(cacheData == 1)
87   - return null;
  87 + return null;*/
88 88  
89 89 GpsEntity gps = new GpsEntity();
90 90  
... ... @@ -109,6 +109,15 @@ public class GpsEntity {
109 109 return (byte)(((serviceState & 0x00100000) == 0x00100000) ? 1 : 0);
110 110 }
111 111  
  112 + public static byte getGpsValid(long serviceState) {
  113 + return (byte)(((serviceState & 0x80000000) == 0x80000000) ? 1 : 0);
  114 + }
  115 +
  116 + public static void main(String[] args){
  117 + int cache = getGpsValid(268435456);
  118 + System.out.println(cache);
  119 + }
  120 +
112 121 /**
113 122 * 获取运营状态
114 123 *
... ...