This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RootUtil { | |
public static boolean isDeviceRooted() { | |
return checkRootMethod1() || checkRootMethod2() || checkRootMethod3(); | |
} | |
private static boolean checkRootMethod1() { | |
String buildTags = android.os.Build.TAGS; | |
return buildTags != null && buildTags.contains("test-keys"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"code": 86, | |
"name": "中华人民共和国", | |
"entries": [{ | |
"code": 110000, | |
"name": "北京市", | |
"entries": [{ | |
"code": 110100, | |
"name": "北京市市辖区", | |
"entries": [{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 各地图API坐标系统比较与转换; | |
* WGS84坐标系:即地球坐标系,国际上通用的坐标系。设备一般包含GPS芯片或者北斗芯片获取的经纬度为WGS84地理坐标系, | |
* 谷歌地图采用的是WGS84地理坐标系(中国范围除外); | |
* GCJ02坐标系:即火星坐标系,是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系。 | |
* 谷歌中国地图和搜搜中国地图采用的是GCJ02地理坐标系; BD09坐标系:即百度坐标系,GCJ02坐标系经加密后的坐标系; | |
* 搜狗坐标系、图吧坐标系等,估计也是在GCJ02基础上加密而成的。 chenhua | |
*/ | |
public class PositionUtil { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StatFsErr { | |
public static long getSdSize() { | |
try { | |
StatFs localStatFs; | |
long l; | |
return l = (localStatFs = new StatFs(Environment.getExternalStorageDirectory().getPath())).getBlockSize() | |
* localStatFs.getBlockCount(); | |
} catch (IllegalArgumentException localIllegalArgumentException) { | |
Object localObject = localIllegalArgumentException; | |
localObject = localIllegalArgumentException.getLocalizedMessage(); |