diff --git a/app/src/main/java/com/uiui/sn/activity/main/MainAPresenter.java b/app/src/main/java/com/uiui/sn/activity/main/MainAPresenter.java index 8985f56..0bdedb0 100644 --- a/app/src/main/java/com/uiui/sn/activity/main/MainAPresenter.java +++ b/app/src/main/java/com/uiui/sn/activity/main/MainAPresenter.java @@ -151,7 +151,7 @@ public class MainAPresenter implements MainAContact.Presenter { NetInterfaceManager.getInstance().getForceInstallState(appInfos); } } else { - boolean aole_force_app = JGYUtils.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, "invalid"); + boolean aole_force_app = JGYUtils.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, ""); Log.e("getForceInstall", "aole_force_app: invalid: " + aole_force_app); } } diff --git a/app/src/main/java/com/uiui/sn/network/NetInterfaceManager.java b/app/src/main/java/com/uiui/sn/network/NetInterfaceManager.java index a104660..0b6a184 100644 --- a/app/src/main/java/com/uiui/sn/network/NetInterfaceManager.java +++ b/app/src/main/java/com/uiui/sn/network/NetInterfaceManager.java @@ -1251,7 +1251,7 @@ public class NetInterfaceManager { if (!TextUtils.isEmpty(home_page)) { homepag.putExtra("homepage", home_page); } else { - homepag.putExtra("homepage", "Invalid"); + homepag.putExtra("homepage", ""); } mContext.sendBroadcast(homepag); @@ -1265,7 +1265,7 @@ public class NetInterfaceManager { if (label_page != null && !"".equals(label_page)) { websiteBookMark.putExtra("websiteBookMark", label_page); } else { - websiteBookMark.putExtra("websiteBookMark", "Invalid"); + websiteBookMark.putExtra("websiteBookMark", ""); } mContext.sendBroadcast(websiteBookMark); } else { @@ -1274,14 +1274,14 @@ public class NetInterfaceManager { intent1.setPackage("com.android.settings") .setPackage("com.android.browser"); } - intent1.putExtra("homepage", "Invalid"); + intent1.putExtra("homepage", ""); mContext.sendBroadcast(intent1); Intent intent2 = new Intent("qch_app_brower_website"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { intent2.setPackage("com.android.settings") .setPackage("com.android.browser"); } - intent2.putExtra("websiteBookMark", "Invalid"); + intent2.putExtra("websiteBookMark", ""); mContext.sendBroadcast(intent2); } } @@ -1574,8 +1574,8 @@ public class NetInterfaceManager { Log.e(TAG, "setAPPIDJump: " + packages); Log.e(TAG, "setAPPIDJump: " + ids); if (TextUtils.isEmpty(ids)) { - JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ID, "Invalid"); - JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ARRAY, "Invalid"); + JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ID, ""); + JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ARRAY, ""); } else { JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ID, packages); JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID_ARRAY, ids); @@ -1584,23 +1584,23 @@ public class NetInterfaceManager { } public void setInvalid() { - boolean aole_app_power_on = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, "Invalid"); - boolean aole_network_allow = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, "Invalid"); - boolean aole_network_disallow = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, "Invalid"); + boolean aole_app_power_on = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, ""); + boolean aole_network_allow = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, ""); + boolean aole_network_disallow = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, ""); boolean writeSucceed = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, ""); } private void sendAllweb() { Intent intent = new Intent("qch_app_website") .setPackage("com.android.settings"); - intent.putExtra("package_name", "Invalid"); + intent.putExtra("package_name", ""); mContext.sendBroadcast(intent); } private void sendwebUrl() { Intent intent = new Intent("qch_app_inside_website") .setPackage("com.android.settings"); - intent.putExtra("websitelist", "Invalid"); + intent.putExtra("websitelist", ""); mContext.sendBroadcast(intent); } @@ -1732,8 +1732,8 @@ public class NetInterfaceManager { } // JGYUtils.getInstance().deleteOtherApp(); } else { - boolean aole_force_app = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_FORCE_APP, "invalid"); - Log.e(TAG, "aole_force_app:" + aole_force_app + ":" + "invalid"); + boolean aole_force_app = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_FORCE_APP, ""); + Log.e(TAG, "aole_force_app:" + aole_force_app + ":" + ""); } } @@ -1782,8 +1782,8 @@ public class NetInterfaceManager { Log.e(TAG, "getForceInstallState: " + packageList); boolean aole_force_app = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_FORCE_APP, packageList); } else { - boolean aole_force_app = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_FORCE_APP, "invalid"); - Log.e(TAG, "getForceInstallState:" + aole_force_app + ":" + "invalid"); + boolean aole_force_app = JGYUtils.putString(crv, CommonConfig.AOLE_ACTION_FORCE_APP, ""); + Log.e(TAG, "getForceInstallState:" + aole_force_app + ":" + ""); } } diff --git a/app/src/main/java/com/uiui/sn/service/main/MainSPresenter.java b/app/src/main/java/com/uiui/sn/service/main/MainSPresenter.java index 11c2e52..59fa73c 100644 --- a/app/src/main/java/com/uiui/sn/service/main/MainSPresenter.java +++ b/app/src/main/java/com/uiui/sn/service/main/MainSPresenter.java @@ -151,6 +151,8 @@ public class MainSPresenter implements MainSContact.Presenter { NetInterfaceManager.getInstance().getAppStart(appInfoList); } JGYUtils.getInstance().deleteOtherApp(); + }else { + ApkUtils.writeAppPackageList(mContext, ""); } } @@ -230,7 +232,7 @@ public class MainSPresenter implements MainSContact.Presenter { NetInterfaceManager.getInstance().getForceInstallState(appInfos); } } else { - boolean aole_force_app = JGYUtils.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, "invalid"); + boolean aole_force_app = JGYUtils.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, ""); Log.e("getForceInstall", "aole_force_app: invalid: " + aole_force_app); } } @@ -315,7 +317,7 @@ public class MainSPresenter implements MainSContact.Presenter { if (!TextUtils.isEmpty(home_page)) { homepag.putExtra("homepage", home_page); } else { - homepag.putExtra("homepage", "Invalid"); + homepag.putExtra("homepage", ""); } mContext.sendBroadcast(homepag); @@ -329,7 +331,7 @@ public class MainSPresenter implements MainSContact.Presenter { if (!TextUtils.isEmpty(label_page)) { websiteBookMark.putExtra("websiteBookMark", label_page); } else { - websiteBookMark.putExtra("websiteBookMark", "Invalid"); + websiteBookMark.putExtra("websiteBookMark", ""); } mContext.sendBroadcast(websiteBookMark); } else { @@ -338,14 +340,14 @@ public class MainSPresenter implements MainSContact.Presenter { intent1.setPackage("com.android.settings") .setPackage("com.android.browser"); } - intent1.putExtra("homepage", "Invalid"); + intent1.putExtra("homepage", ""); mContext.sendBroadcast(intent1); Intent intent2 = new Intent("qch_app_brower_website"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { intent2.setPackage("com.android.settings") .setPackage("com.android.browser"); } - intent2.putExtra("websiteBookMark", "Invalid"); + intent2.putExtra("websiteBookMark", ""); mContext.sendBroadcast(intent2); } } diff --git a/app/src/main/java/com/uiui/sn/tpush/MessageReceiver.java b/app/src/main/java/com/uiui/sn/tpush/MessageReceiver.java index cbf0073..ea90eae 100644 --- a/app/src/main/java/com/uiui/sn/tpush/MessageReceiver.java +++ b/app/src/main/java/com/uiui/sn/tpush/MessageReceiver.java @@ -906,14 +906,14 @@ public class MessageReceiver extends XGPushBaseReceiver { boolean aole_network_allow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_ALLOW, package0); Log.e("fht", "aole_network_allow::" + aole_network_allow + ":" + JGYUtils.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_ALLOW)); } else { - boolean aole_network_allow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_ALLOW, "invalid"); + boolean aole_network_allow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_ALLOW, ""); Log.e("fht", "aole_network_allow::" + aole_network_allow + ":" + JGYUtils.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_ALLOW)); } if (package1.length() != 0) { boolean aole_network_disallow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, package1); Log.e("fht", "aole_network_disallow::" + aole_network_disallow + ":" + JGYUtils.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_DISALLOW)); } else { - boolean aole_network_disallow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, "invalid"); + boolean aole_network_disallow = JGYUtils.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, ""); Log.e("fht", "aole_network_disallow::" + aole_network_disallow + ":" + JGYUtils.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_NETWORK_DISALLOW)); } } else { @@ -1302,7 +1302,7 @@ public class MessageReceiver extends XGPushBaseReceiver { } Log.e("blackList", JGYUtils.getString(context.getContentResolver(), "qch_webblack_url")); } else { - boolean setBrowserUrlpath = JGYUtils.putString(context.getContentResolver(), "DeselectBrowserArray", "invalid"); + boolean setBrowserUrlpath = JGYUtils.putString(context.getContentResolver(), "DeselectBrowserArray", ""); ToastUtil.debugShow("setBrowserUrlpath jsonString is NULL,set default: " + setBrowserUrlpath); } } diff --git a/app/src/main/java/com/uiui/sn/utils/JGYUtils.java b/app/src/main/java/com/uiui/sn/utils/JGYUtils.java index 2421d83..88e48c2 100644 --- a/app/src/main/java/com/uiui/sn/utils/JGYUtils.java +++ b/app/src/main/java/com/uiui/sn/utils/JGYUtils.java @@ -249,14 +249,14 @@ public class JGYUtils { private void sendAllweb() { Intent intent = new Intent("qch_app_website") .setPackage("com.android.settings"); - intent.putExtra("package_name", "Invalid"); + intent.putExtra("package_name", ""); mContext.sendBroadcast(intent); } private void sendwebUrl() { Intent intent = new Intent("qch_app_inside_website") .setPackage("com.android.settings"); - intent.putExtra("websitelist", "Invalid"); + intent.putExtra("websitelist", ""); mContext.sendBroadcast(intent); } @@ -710,11 +710,11 @@ public class JGYUtils { //清除旧数据 if (!TextUtils.isEmpty(dis)) { Log.e(TAG, "setAppNetwork: dis = " + dis); - Settings.System.putString(resolver, CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, "Invalid"); + Settings.System.putString(resolver, CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, ""); } if (!TextUtils.isEmpty(not)) { Log.e(TAG, "setAppNetwork: not = " + not); - Settings.System.putString(resolver, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, "Invalid"); + Settings.System.putString(resolver, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, ""); } String oldBlackList = (String) SPUtils.get(mContext, CommonConfig.AOLE_ACTION_NETWORK_DISALLOW, ""); diff --git a/app/src/main/java/com/uiui/sn/utils/URLUtils.java b/app/src/main/java/com/uiui/sn/utils/URLUtils.java index 34949fe..72271e3 100644 --- a/app/src/main/java/com/uiui/sn/utils/URLUtils.java +++ b/app/src/main/java/com/uiui/sn/utils/URLUtils.java @@ -45,7 +45,7 @@ public class URLUtils { Log.e(TAG, "setBrowserList old: " + oldwhiteList); if (TextUtils.isEmpty(oldwhiteList) && TextUtils.isEmpty(oldHomePage)) { Log.e(TAG, "getBrowserWhiteList: " + "oldwhiteList is empty"); - Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", "Invalid"); + Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", ""); } else { HashSet URLList = new HashSet<>(); if (!TextUtils.isEmpty(oldwhiteList)) { @@ -59,7 +59,7 @@ public class URLUtils { URLList.removeIf(s -> TextUtils.isEmpty(s.trim())); if (URLList.size() == 0) { Log.e(TAG, "setBrowserWhiteList: URLList set is empty , set Invalid"); - Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", "Invalid"); + Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", ""); return; } Log.e(TAG, "setBrowserList: " + URLList); @@ -171,7 +171,7 @@ public class URLUtils { String qch_webblack_url = Settings.System.getString(mContext.getContentResolver(), "qch_webblack_url"); Log.e(TAG, "setBrowserBlackList: qch_webblack_url = " + qch_webblack_url); if (TextUtils.isEmpty(qch_webblack_url)) { - Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", "Invalid"); + Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", ""); } else { String black_ip = (String) SPUtils.get(mContext, "black_ip", ""); if (!TextUtils.isEmpty(black_ip)) {