Commit bad4224c by sikang

add new api

parent 7685731d
...@@ -118,11 +118,27 @@ public class DeviceInfo { ...@@ -118,11 +118,27 @@ public class DeviceInfo {
"tags=" + Build.TAGS + "&" + "tags=" + Build.TAGS + "&" +
"type=" + Build.TYPE + "&" + "type=" + Build.TYPE + "&" +
"root=" + isRoot() + "&" + "root=" + isRoot() + "&" +
"user=" + Build.USER + "&" + DEFAULT_LANGUAGE; "user=" + Build.USER + "&";
if (TextUtils.isEmpty(DEFAULT_LANGUAGE)) {
initDefaultLanguage(Locale.getDefault());
}
hardwareInfo += DEFAULT_LANGUAGE;
return hardwareInfo; return hardwareInfo;
} }
/**
* 默认语言被修改前,先记录下来
*/
public static void initDefaultLanguage(Locale locale) {
DEFAULT_LANGUAGE = "country=" + locale.getCountry() + "&" +
"language=" + locale.getLanguage() + "&" +
"display_country=" + locale.getDisplayCountry() + "&" +
"display_language=" + locale.getDisplayLanguage() + "&" +
"display_name=" + locale.getDisplayName();
}
public static boolean isRoot() { public static boolean isRoot() {
try { try {
return new File("/system/bin/su").exists() || new File("/system/xbin/su").exists(); return new File("/system/bin/su").exists() || new File("/system/xbin/su").exists();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment