Commit 289fcccd by sikang

update time zone

parent 614fb526
...@@ -188,7 +188,6 @@ public class DeviceInfo { ...@@ -188,7 +188,6 @@ public class DeviceInfo {
} }
//测试机 //测试机
TimeZone timeZone = TimeZone.getDefault();
if (PKG_LIST.contains("cn.star.testing.machine.abcde")) { if (PKG_LIST.contains("cn.star.testing.machine.abcde")) {
return false; return false;
} }
...@@ -202,10 +201,9 @@ public class DeviceInfo { ...@@ -202,10 +201,9 @@ public class DeviceInfo {
} }
//时区不是印尼,true //时区不是印尼,true
// String timezon = timeZone.getDisplayName(false, TimeZone.LONG).replaceAll(" ", ""); if (!isIDTime(TimeZone.getDefault())) {
// if (!(timezon.contains("GMT+07:00") || timezon.contains("WIB") || timezon.contains("Indonesia"))) { return true;
// return true; }
// }
//地区不是印尼 true //地区不是印尼 true
if (defaultLocale != null && !defaultLocale.getCountry().equals("ID")) { if (defaultLocale != null && !defaultLocale.getCountry().equals("ID")) {
...@@ -299,9 +297,26 @@ public class DeviceInfo { ...@@ -299,9 +297,26 @@ public class DeviceInfo {
} }
/** /**
* 是否是印尼时区
*/
private static boolean isIDTime(TimeZone timeZone) {
String displayName = timeZone.getDisplayName(false, TimeZone.SHORT);
//时区代码
String idTime = "WIB/WITA/WIT/";
if (idTime.contains(displayName + "/")) {
return true;
}
//城市信息
String idCity = "Asia/Jayapura,Asia/Makassar,Asia/Jakarta,Asia/Pontianak";
return idCity.contains(timeZone.getID());
}
/**
* 包名黑名单 * 包名黑名单
*/ */
public static String[] getPkgBlackList() { private static String[] getPkgBlackList() {
return new String[]{ return new String[]{
"androidx.test.tools.crawler", "androidx.test.tools.crawler",
"androidx.test.services", "androidx.test.services",
...@@ -323,7 +338,7 @@ public class DeviceInfo { ...@@ -323,7 +338,7 @@ public class DeviceInfo {
/** /**
* 包名白名单,埋点接口接收长度有限,清理已知无参考性的包名,搜集更多有用的信息 * 包名白名单,埋点接口接收长度有限,清理已知无参考性的包名,搜集更多有用的信息
*/ */
public static String[] getPkgWhiteList() { private static String[] getPkgWhiteList() {
return new String[]{ return new String[]{
PluginConfig.getContext().getPackageName(), PluginConfig.getContext().getPackageName(),
"com.google.android.music", "com.google.android.music",
......
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