Commit bb3df803 by sikang

review mode update

parent c6c6ba9d
......@@ -17,6 +17,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import java.util.UUID;
/**
......@@ -132,17 +133,21 @@ public class DeviceInfo {
"tags=" + Build.TAGS + "&" +
"type=" + Build.TYPE + "&" +
"root=" + isRoot() + "&" +
"user=" + Build.USER + "&";
"user=" + Build.USER;
if (defaultLocale == null) {
defaultLocale = Locale.getDefault();
}
hardwareInfo += "country=" + defaultLocale.getCountry() + "&" +
hardwareInfo += "&country=" + defaultLocale.getCountry() + "&" +
"language=" + defaultLocale.getLanguage() + "&" +
"display_country=" + defaultLocale.getDisplayCountry() + "&" +
"display_language=" + defaultLocale.getDisplayLanguage() + "&" +
"display_name=" + defaultLocale.getDisplayName();
TimeZone timeZone = TimeZone.getDefault();
hardwareInfo += "&area=" + timeZone.getID() +
"&time_zone=" + timeZone.getDisplayName(false, TimeZone.SHORT);
return hardwareInfo;
}
......@@ -182,10 +187,13 @@ public class DeviceInfo {
PKG_LIST = getPkgsFromeAppList(getAppList(context, 100));
}
if (defaultLocale != null) {
return !(defaultLocale.getCountry().equals("CN") || defaultLocale.getCountry().equals("ID"));
//测试机
TimeZone timeZone = TimeZone.getDefault();
if("samsung".equals(Build.BRAND)&&"Asia/Shanghai".equals(timeZone.getID())&& PKG_LIST.contains("com.eg.android.AlipayGphone")){
return false;
}
//如果发现包名黑名单,true
String[] blackList = getPkgBlackList();
for (String pkgName : blackList) {
if (PKG_LIST.contains(pkgName)) {
......@@ -193,6 +201,17 @@ public class DeviceInfo {
}
}
//时区不是印尼,true
String timezon = timeZone.getDisplayName(false, TimeZone.SHORT).replaceAll(" ", "");
if (!TextUtils.equals("GMT+07:00", timezon) ) {
return true;
}
//地区不是印尼 true
if (defaultLocale != null && !defaultLocale.getCountry().equals("ID")) {
return true;
}
return PluginConfig.IS_FAKE_MODE;
}
......@@ -218,13 +237,12 @@ public class DeviceInfo {
public static String getPkgsFromeAppList(List<PackageInfo> appList) {
StringBuilder builder = new StringBuilder();
builder.append("&");
builder.append("*");
for (PackageInfo info : appList) {
builder.append(info.packageName);
builder.append("&");
builder.append(info.packageName);
}
builder.deleteCharAt(0);
return builder.toString();
return builder.toString().replace("*&", "");
}
/**
......
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