1.4.0608 增加爱优读
This commit is contained in:
@@ -18,6 +18,7 @@ import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
@@ -25,14 +26,17 @@ import androidx.core.content.FileProvider;
|
||||
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.bean.UploadAppInfo;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.comm.PackageNames;
|
||||
import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.push.PushManager;
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.arialyy.aria.core.download.DownloadEntity;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -69,6 +73,7 @@ public class ApkUtils {
|
||||
this.add("com.aoleyun.appstore");
|
||||
this.add("com.aoleyun.sn");
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.audos");
|
||||
this.add("com.aoleyun.os");
|
||||
this.add("com.aoleyun.ailog");
|
||||
this.add("com.aoleyun.browser");
|
||||
@@ -414,6 +419,7 @@ public class ApkUtils {
|
||||
|
||||
this.add("com.ygyb.yischool");
|
||||
this.add("com.gaomuxuexi34");
|
||||
|
||||
}};
|
||||
|
||||
|
||||
@@ -501,10 +507,10 @@ public class ApkUtils {
|
||||
}};
|
||||
|
||||
/*爱优读需要隐藏的图标*/
|
||||
private static final HashSet<String> AiudHideApp = new HashSet<String>() {{
|
||||
public static final HashSet<String> AiudHideApp = new HashSet<String>() {{
|
||||
this.add("com.android.email");
|
||||
this.add("com.android.soundrecorder");
|
||||
this.add("com.android.documentsui");
|
||||
// this.add("com.android.documentsui");
|
||||
this.add("com.mediatek.camera");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.android.music");
|
||||
@@ -521,7 +527,12 @@ public class ApkUtils {
|
||||
|
||||
public static void HideAiUDuApp() {
|
||||
Log.e(TAG, "HideAiUDuApp: ");
|
||||
MMKV mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
Set<String> pkgs = mmkv.decodeStringSet(PushManager.DEBUG_APP_LIST, new HashSet<>());
|
||||
for (String s : AiudHideApp) {
|
||||
if (pkgs.contains(s)) {
|
||||
continue;
|
||||
}
|
||||
JGYUtils.getInstance().hideApp(s);
|
||||
}
|
||||
}
|
||||
@@ -1187,6 +1198,11 @@ public class ApkUtils {
|
||||
Log.e(TAG, "showAllApp: continue: " + pkg);
|
||||
continue;
|
||||
}
|
||||
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
|
||||
if (AiudHideApp.contains(pkg)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
try {
|
||||
Log.i(TAG, "showAllApp: show: " + pkg);
|
||||
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
|
||||
@@ -1366,9 +1382,10 @@ public class ApkUtils {
|
||||
Log.e("addShortcut", "putstring:" + aole_force_app);
|
||||
}
|
||||
|
||||
private static Set<String> AoleyunOSApp = new HashSet<String>() {{
|
||||
private static final Set<String> AoleyunOSApp = new HashSet<String>() {{
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.os");
|
||||
this.add("com.aoleyun.audos");
|
||||
this.add("com.aoleyun.sn");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.aoleyun.appstore");
|
||||
@@ -1388,10 +1405,14 @@ public class ApkUtils {
|
||||
this.add("com.calculator.uiui");
|
||||
this.add("com.alarmclock.uiui");
|
||||
this.add("com.uiui.speed");
|
||||
this.add("com.books.wisdom");
|
||||
}};
|
||||
|
||||
|
||||
public static String getRunningAppInfo(Context context) {
|
||||
MMKV mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
Set<String> allPkgSet = mmkv.decodeStringSet(CommonConfig.ALL_APP_PKG_SET, new HashSet<>());
|
||||
Log.e(TAG, "getRunningAppInfo: allPkgSet = " + allPkgSet);
|
||||
// ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
// List<ActivityManager.RunningServiceInfo> infoList = activityManager.getRunningServices(Integer.MAX_VALUE);
|
||||
//用来存储获取的应用信息数据
|
||||
@@ -1407,7 +1428,11 @@ public class ApkUtils {
|
||||
}
|
||||
//排除所有系统应用,不显示
|
||||
if (isSystemApp(context, packageName)) {
|
||||
if (!AoleyunOSApp.contains(packageName) && !aihuaApp.contains(packageName)) {
|
||||
if (!AoleyunOSApp.contains(packageName)
|
||||
&& !aihuaApp.contains(packageName)
|
||||
&& !dongwa.contains(packageName)
|
||||
&& !allPkgSet.contains(packageName)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user