version:2.2.8
update:2021-10-11 18:24:45 fix:修复未设置主页和书签时,单独IP白名单管控失效 add:
This commit is contained in:
@@ -2,14 +2,10 @@ package com.mjsheng.myappstore.comm;
|
||||
|
||||
|
||||
public class CommonDatas {
|
||||
|
||||
public final static String SP_BABY_AGE_KEY = "age_system";//子系统选择
|
||||
public final static String SP_USER_VIP = "user_vip";//用户等级
|
||||
public final static String SP_PARENT_PASSWORD = "parent_password";//家长密码
|
||||
public final static String IS_RESET = "IS_RESET";
|
||||
public final static int MIN_POWER = 21;
|
||||
public final static String FORCE_INSTALL = "FORCE_INSTALL";
|
||||
public final static String FLAG_FIRST_ENTER = "qch_first_enter";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ public class URLUtils {
|
||||
time1 = System.currentTimeMillis();
|
||||
//会写入两次,第一次是不带前缀的,第二次会把实际的地址写入进去
|
||||
String oldwhiteList = Settings.System.getString(mContext.getContentResolver(), "DeselectBrowserArray");
|
||||
if (TextUtils.isEmpty(oldwhiteList)) {
|
||||
String oldWhiteIP = (String) SPUtils.get(mContext, "white_ip", "");
|
||||
if (TextUtils.isEmpty(oldwhiteList) && TextUtils.isEmpty(oldWhiteIP)) {
|
||||
Logutils.e(TAG, "getBrowserWhiteList: " + "oldwhiteList is empty");
|
||||
Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", "Invalid");
|
||||
} else {
|
||||
@@ -58,7 +59,7 @@ public class URLUtils {
|
||||
Logutils.e(TAG, "getBrowserWhiteList: " + "oldwhiteList is : " + oldwhiteList);
|
||||
HashSet<String> URLList = new HashSet<>(Arrays.asList(oldwhiteList.trim().split(",")));
|
||||
URLList.removeIf(TextUtils::isEmpty);
|
||||
if (URLList.size() == 0) {
|
||||
if (URLList.size() == 0 && whiteIPList.size() == 0) {
|
||||
Log.e(TAG, "setBrowserWhiteList: URLList set is empty , set Invalid");
|
||||
Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", "Invalid");
|
||||
return;
|
||||
@@ -204,7 +205,6 @@ public class URLUtils {
|
||||
Logutils.e(TAG, "onComplete: " + "white list: " + DeselectBrowserArray);
|
||||
boolean write = Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", DeselectBrowserArray);
|
||||
Logutils.i(TAG, "onComplete: " + "write :" + write + " time = " + (System.currentTimeMillis() - time1));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user