version:2.2.10.25
fix: update:增加禁用app
This commit is contained in:
@@ -944,6 +944,30 @@ public class ApkUtils {
|
||||
this.add("com.android.calculator2");
|
||||
this.add("com.qi.TFSystem");
|
||||
this.add("com.qi.appstore");
|
||||
|
||||
this.add("com.wyt.evaluating");
|
||||
this.add("com.wyt.picturebook");
|
||||
this.add("com.hhdd.kadahd");
|
||||
this.add("com.wyt.onlinedic");
|
||||
this.add("com.ximalaya.ting.kid");
|
||||
this.add("com.baidu.duershow.child");
|
||||
this.add("com.gl.souti");
|
||||
this.add("com.ihuman.pinyin");
|
||||
this.add("com.hongen.app.word");
|
||||
this.add("com.wyt.parents_assistant");
|
||||
this.add("com.wyt.forbitpoint");
|
||||
this.add("com.wyt.lessonhelper");
|
||||
this.add("com.wyt.wangkexueximvvm");
|
||||
this.add("com.wyt.clicktoread");
|
||||
this.add("com.robot.app_ai");
|
||||
this.add("com.wyt.appstore");
|
||||
this.add("air.com.wyt.GLLearnMain");
|
||||
this.add("com.wyt.examcenter");
|
||||
|
||||
this.add("com.gl.compositioncorrection");
|
||||
this.add("com.gl.compositioncorrectionen");
|
||||
this.add("cn.wps.moffice_eng");
|
||||
this.add("com.ckl.launcher");
|
||||
}};
|
||||
|
||||
public static void showAllAPP(Context context) {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.aoleyun.sn.utils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
public class GsonUtils {
|
||||
public static JsonObject getJsonObject(String jsonString) {
|
||||
JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject();
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
// TODO: 2022/3/31 暂时没有实现
|
||||
public static <T> T getJsonFromType(String jsonString, Class clazz) {
|
||||
Gson gson = new Gson();
|
||||
T t = (T) gson.fromJson(jsonString, clazz);
|
||||
return t;
|
||||
}
|
||||
|
||||
public static String toJsonString(Object o) {
|
||||
return new Gson().toJson(o);
|
||||
}
|
||||
}
|
||||
@@ -1120,10 +1120,12 @@ public class JGYUtils {
|
||||
this.add("com.calendar.uiui");
|
||||
this.add("com.alarmclock.uiui");
|
||||
this.add("com.uiui.videoplayer");
|
||||
|
||||
}};
|
||||
HashSet<String> pkgSet = new HashSet<>(Arrays.asList(packageList.split(",")));
|
||||
pkgSet.addAll(packages);
|
||||
pkgSet.addAll(ApkUtils.desktopAPP);
|
||||
pkgSet.addAll(ApkUtils.aoleyunAPP);
|
||||
pkgSet.addAll(ApkUtils.aihuaApp);
|
||||
pkgSet.removeIf(TextUtils::isEmpty);
|
||||
String aole_app_forbid = String.join(",", pkgSet);
|
||||
Log.e(TAG, "writeAppPackageList: " + aole_app_forbid);
|
||||
@@ -1799,18 +1801,23 @@ public class JGYUtils {
|
||||
}
|
||||
|
||||
public void removeTask(String packageName) {
|
||||
List<ActivityManager.RecentTaskInfo> list = getRecentTasks(ActivityManager.getMaxRecentTasksStatic(), getCurrentUserId());
|
||||
HashMap<String, Integer> taskMap = new HashMap<>();
|
||||
for (ActivityManager.RecentTaskInfo info : list) {
|
||||
taskMap.put(info.realActivity.getPackageName(), info.id);
|
||||
}
|
||||
try {
|
||||
ActivityManagerNative.getDefault().removeTask(taskMap.get(packageName));
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(TAG, "removeTask: " + e.getMessage());
|
||||
} catch (NullPointerException e) {
|
||||
Log.e(TAG, "removeTask: " + e.getMessage());
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
|
||||
List<ActivityManager.RecentTaskInfo> list = getRecentTasks(ActivityManager.getMaxRecentTasksStatic(), getCurrentUserId());
|
||||
HashMap<String, Integer> taskMap = new HashMap<>();
|
||||
for (ActivityManager.RecentTaskInfo info : list) {
|
||||
taskMap.put(info.realActivity.getPackageName(), info.id);
|
||||
}
|
||||
try {
|
||||
ActivityManagerNative.getDefault().removeTask(taskMap.get(packageName));
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(TAG, "removeTask: " + e.getMessage());
|
||||
} catch (NullPointerException e) {
|
||||
Log.e(TAG, "removeTask: " + e.getMessage());
|
||||
}
|
||||
} else {
|
||||
ActivityManager activityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
// TODO: 2022/10/25
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user