1.4.0117 YX-T01不显示小程序二维码

This commit is contained in:
2024-01-18 19:40:51 +08:00
parent 913270821c
commit 6d8e4509f0
17 changed files with 275 additions and 175 deletions

View File

@@ -1560,6 +1560,7 @@ public class JGYUtils {
this.add("com.tencent.mm");
this.add("cn.wps.moffice_eng");
this.add("com.baidu.BaiduMap");
this.add("com.tongyi.aistudent");
}};
/**
@@ -1580,7 +1581,10 @@ public class JGYUtils {
} else {
continue;
}
if (!showAppList.contains(pkg) && !ApkUtils.aihuaApp.contains(pkg)) {
if (!showAppList.contains(pkg)
&& !ApkUtils.aoleyunAPP.contains(pkg)
&& !ApkUtils.aihuaApp.contains(pkg)
) {
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
Log.e(TAG, "hideSystemAPP: " + "disable: " + pkg);
} else {
@@ -1591,6 +1595,7 @@ public class JGYUtils {
}
public void hideApp(String pkg) {
Log.e(TAG, "hideApp: " + pkg);
PackageManager pm = mContext.getPackageManager();
try {
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
@@ -1600,6 +1605,7 @@ public class JGYUtils {
}
public void showApp(String pkg) {
Log.e(TAG, "showApp: " + pkg);
PackageManager pm = mContext.getPackageManager();
try {
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
@@ -2995,4 +3001,12 @@ public class JGYUtils {
}
}
}
public void setTongyiAppTop() {
if (ApkUtils.isAvailable(mContext, "com.tongyi.aistudent")) {
ForegroundAppUtil.setTopAppClass(mContext, "com.tongyi.aistudent");
Settings.Global.putString(mContext.getContentResolver(), ForegroundAppUtil.TOPAPP_KEY, "com.tongyi.aistudent");
ForegroundAppUtil.openTopApp(mContext);
}
}
}