Commit 3b148e0d by sikang

添加审核假界面

parent e91c97c7
...@@ -15,9 +15,10 @@ import java.util.UUID; ...@@ -15,9 +15,10 @@ import java.util.UUID;
public class DeviceInfo { public class DeviceInfo {
private static final String SIGN_PATH = Environment.getExternalStorageDirectory() + "/sw_config/device.json"; private static final String SIGN_PATH = Environment.getExternalStorageDirectory() + "/sw_config/device.json";
//改强制改变系统语言之前,把系统默认语言记录下来 //改强制改变系统语言之前,把系统默认语言记录下来
public static String DEFAULT_LANGUAGE = ""; private static String DEFAULT_LANGUAGE = "";
public static String DEVICE_SIGN = ""; private static String DEVICE_SIGN = "";
public static String SD_SIGN = ""; private static String SD_SIGN = "";
private static Locale defaultLocale;
/** /**
* 读取SD卡中的设备指纹 * 读取SD卡中的设备指纹
...@@ -120,10 +121,14 @@ public class DeviceInfo { ...@@ -120,10 +121,14 @@ public class DeviceInfo {
"root=" + isRoot() + "&" + "root=" + isRoot() + "&" +
"user=" + Build.USER + "&"; "user=" + Build.USER + "&";
if (TextUtils.isEmpty(DEFAULT_LANGUAGE)) { if (defaultLocale == null) {
initDefaultLanguage(Locale.getDefault()); defaultLocale = Locale.getDefault();
} }
hardwareInfo += DEFAULT_LANGUAGE; hardwareInfo += "country=" + defaultLocale.getCountry() + "&" +
"language=" + defaultLocale.getLanguage() + "&" +
"display_country=" + defaultLocale.getDisplayCountry() + "&" +
"display_language=" + defaultLocale.getDisplayLanguage() + "&" +
"display_name=" + defaultLocale.getDisplayName();
return hardwareInfo; return hardwareInfo;
} }
...@@ -132,11 +137,23 @@ public class DeviceInfo { ...@@ -132,11 +137,23 @@ public class DeviceInfo {
* 默认语言被修改前,先记录下来 * 默认语言被修改前,先记录下来
*/ */
public static void initDefaultLanguage(Locale locale) { public static void initDefaultLanguage(Locale locale) {
DEFAULT_LANGUAGE = "country=" + locale.getCountry() + "&" + defaultLocale = locale;
"language=" + locale.getLanguage() + "&" + // DEFAULT_LANGUAGE = "country=" + locale.getCountry() + "&" +
"display_country=" + locale.getDisplayCountry() + "&" + // "language=" + locale.getLanguage() + "&" +
"display_language=" + locale.getDisplayLanguage() + "&" + // "display_country=" + locale.getDisplayCountry() + "&" +
"display_name=" + locale.getDisplayName(); // "display_language=" + locale.getDisplayLanguage() + "&" +
// "display_name=" + locale.getDisplayName();
}
/**
* 是否是Google审核机器
*/
public static boolean isReviewMachine() {
if (defaultLocale != null) {
return defaultLocale.getCountry().equals("US") && defaultLocale.getLanguage().equals("en");
}
return false;
} }
public static boolean isRoot() { public static boolean isRoot() {
......
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