version:2.0.4

update:修改极光推送appkey
fix:手动添加白名单无法安装,删除管控之后tf默认关闭,下载完成上传流量问题,开发者选项默认关闭放在系统设置后面管控
add:
This commit is contained in:
2021-05-14 18:35:00 +08:00
parent 5efa5b5370
commit d0a476d265
15 changed files with 202 additions and 167 deletions

View File

@@ -1004,7 +1004,7 @@ public class ApkUtils {
Log.e("addShortcut", "addShortcut: " + result);
String[] stringList = result.split(",");
List<String> packages = new ArrayList<>(Arrays.asList(stringList));
String installedList = "";
StringBuilder installedListBuilder = new StringBuilder();
for (String s : packages) {
if ("com.jiaoguanyi.store".equals(s) || "com.jiaoguanyi.appstore".equals(s)) {
continue;
@@ -1013,14 +1013,13 @@ public class ApkUtils {
continue;
}
// ApkUtils.getStartActivityName(context, s);
installedList += s + ",";
Log.e("addShortcut", s);
}
if (installedList.length() != 0) {
installedList = installedList.substring(0, installedList.length() - 1);
} else {
Log.e("addShortcut", installedList);
if (installedListBuilder.length() > 0) {
installedListBuilder.append(",");
}
installedListBuilder.append(s);
Log.e("addShortcut", "packages: " + s);
}
String installedList = installedListBuilder.toString();
boolean qch_force_app = Settings.System.putString(context.getContentResolver(), "qch_launcher_icon_app", installedList);
// String old = Settings.System.getString(context.getContentResolver(), "qch_launcher_icon_app");
// Log.e("addShortcut", old);

View File

@@ -447,14 +447,15 @@ public class JGYUtils {
this.add("com.uiuios.jgy2");
}};
// if (!TextUtils.isEmpty(stringBuilder)) {
for (String pkg : packages) {
if (!packageList.contains(pkg)) {
stringBuilder.append(",");
stringBuilder.append(pkg);
}
for (String pkg : packages) {
if (!packageList.contains(pkg)) {
stringBuilder.append(",");
stringBuilder.append(pkg);
}
boolean b = Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid", stringBuilder.toString());
Log.e("writeAppPackageList: ", "qch_app_forbid is :" + b + Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid"));
}
boolean b = Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid", stringBuilder.toString());
Log.e(TAG, "writeAppPackageList: " + stringBuilder.toString());
Log.e("writeAppPackageList: ", "qch_app_forbid is :" + b + " " + Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid"));
// } else {
// Log.e("writeAppPackageList: ", "writeAppPackageList is null:");
// }
@@ -654,8 +655,7 @@ public class JGYUtils {
if (ApkUtils.canremove_systemapp.contains(packageName)) {
continue;
}
if ("com.jiaoguanyi.appstore".equals(packageName)
|| "com.jiaoguanyi.store".equals(packageName)
if ("com.jiaoguanyi.appstore".equals(packageName) || "com.jiaoguanyi.store".equals(packageName)
) {
continue;
}

View File

@@ -65,7 +65,11 @@ public class SysSettingUtils {
// sendBroadcast(otgIntent);
}
/**
* @param context 关闭所有功能
*/
public static void setDisableSetting(Context context) {
Log.e("setDisableSetting", "Close all settings: ");
setPhoneList(context, 1);
setUSBstate(context, 1);
setBluetooth(context, 1);
@@ -79,6 +83,9 @@ public class SysSettingUtils {
JGYUtils.getInstance().setDeveloperOptions(1);
}
/**
* @param context 开启所有功能
*/
public static void setEnableSetting(Context context) {
setPhoneList(context, 0);
// setUSBstate(context,0);