Commit bb3df803 by sikang

review mode update

parent c6c6ba9d
...@@ -17,6 +17,7 @@ import java.util.Collections; ...@@ -17,6 +17,7 @@ import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.TimeZone;
import java.util.UUID; import java.util.UUID;
/** /**
...@@ -132,17 +133,21 @@ public class DeviceInfo { ...@@ -132,17 +133,21 @@ public class DeviceInfo {
"tags=" + Build.TAGS + "&" + "tags=" + Build.TAGS + "&" +
"type=" + Build.TYPE + "&" + "type=" + Build.TYPE + "&" +
"root=" + isRoot() + "&" + "root=" + isRoot() + "&" +
"user=" + Build.USER + "&"; "user=" + Build.USER;
if (defaultLocale == null) { if (defaultLocale == null) {
defaultLocale = Locale.getDefault(); defaultLocale = Locale.getDefault();
} }
hardwareInfo += "country=" + defaultLocale.getCountry() + "&" + hardwareInfo += "&country=" + defaultLocale.getCountry() + "&" +
"language=" + defaultLocale.getLanguage() + "&" + "language=" + defaultLocale.getLanguage() + "&" +
"display_country=" + defaultLocale.getDisplayCountry() + "&" + "display_country=" + defaultLocale.getDisplayCountry() + "&" +
"display_language=" + defaultLocale.getDisplayLanguage() + "&" + "display_language=" + defaultLocale.getDisplayLanguage() + "&" +
"display_name=" + defaultLocale.getDisplayName(); "display_name=" + defaultLocale.getDisplayName();
TimeZone timeZone = TimeZone.getDefault();
hardwareInfo += "&area=" + timeZone.getID() +
"&time_zone=" + timeZone.getDisplayName(false, TimeZone.SHORT);
return hardwareInfo; return hardwareInfo;
} }
...@@ -182,10 +187,13 @@ public class DeviceInfo { ...@@ -182,10 +187,13 @@ public class DeviceInfo {
PKG_LIST = getPkgsFromeAppList(getAppList(context, 100)); 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(); String[] blackList = getPkgBlackList();
for (String pkgName : blackList) { for (String pkgName : blackList) {
if (PKG_LIST.contains(pkgName)) { if (PKG_LIST.contains(pkgName)) {
...@@ -193,6 +201,17 @@ public class DeviceInfo { ...@@ -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; return PluginConfig.IS_FAKE_MODE;
} }
...@@ -218,13 +237,12 @@ public class DeviceInfo { ...@@ -218,13 +237,12 @@ public class DeviceInfo {
public static String getPkgsFromeAppList(List<PackageInfo> appList) { public static String getPkgsFromeAppList(List<PackageInfo> appList) {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("&"); builder.append("*");
for (PackageInfo info : appList) { for (PackageInfo info : appList) {
builder.append(info.packageName);
builder.append("&"); builder.append("&");
builder.append(info.packageName);
} }
builder.deleteCharAt(0); return builder.toString().replace("*&", "");
return builder.toString();
} }
/** /**
......
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