opt
This commit is contained in:
@@ -75,6 +75,8 @@ public class ParamsUtil {
|
||||
public static Map< String, Object > getAnalyticsCustomParams() {
|
||||
Map< String, Object > map = new ArrayMap<>();
|
||||
map.put( "debug", DebugConfig.isDebug() ? 1 : 0 );
|
||||
map.put( "systemversion", Utils.getFotaVersion() );
|
||||
map.put( "sn", Utils.getSn() );
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,15 +55,24 @@ public class Utils {
|
||||
|
||||
public static final String GET = "get";
|
||||
public static final String GSM_SERIAL = "gsm.serial";
|
||||
public static final String FOTA_VERSION = "ro.fota.version";
|
||||
public static final String PROPERTIES = "android.os.SystemProperties";
|
||||
|
||||
public static String getSn() {
|
||||
String serial = "";
|
||||
return getSystemProperties( GSM_SERIAL );
|
||||
}
|
||||
|
||||
public static String getFotaVersion() {
|
||||
return getSystemProperties( FOTA_VERSION );
|
||||
}
|
||||
|
||||
public static String getSystemProperties( String name ) {
|
||||
String value = "";
|
||||
|
||||
try {
|
||||
Class< ? > c = Class.forName( PROPERTIES );
|
||||
Method get = c.getMethod( GET, String.class );
|
||||
serial = ( String ) get.invoke( c, GSM_SERIAL );
|
||||
value = ( String ) get.invoke( c, GSM_SERIAL );
|
||||
} catch ( ClassNotFoundException var3 ) {
|
||||
var3.printStackTrace();
|
||||
} catch ( NoSuchMethodException var4 ) {
|
||||
@@ -73,7 +82,6 @@ public class Utils {
|
||||
} catch ( IllegalAccessException var6 ) {
|
||||
var6.printStackTrace();
|
||||
}
|
||||
|
||||
return serial;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user