version:2.2.10.25

fix:
update:增加禁用app功能
This commit is contained in:
2022-10-26 10:22:59 +08:00
parent 7425bdd59c
commit 8acda9798b
3 changed files with 19 additions and 5 deletions

View File

@@ -67,11 +67,11 @@ android {
targetSdkVersion 28
// //MTK
// versionCode 31
// versionName "2.2.8.19"
versionCode 31
versionName "2.2.10.25"
// //cube
versionCode 59
versionName "6.2.8.19"
// versionCode 59
// versionName "6.2.8.19"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。

View File

@@ -186,6 +186,10 @@ public class ItemClickHandler {
if (JGYUtils.isUnlocked(context)) {
return false;
}
if (JGYUtils.isDisable(context, pkg)) {
ToastUtil.show("应用已被禁用");
return true;
}
switch (pkg) {
case "com.mediatek.camera":
case "com.android.camera2":

View File

@@ -11,7 +11,6 @@ import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import com.android.server.BootReceiver;
import com.aoleyun.os.BuildConfig;
import com.aoleyun.os.comm.JGYActions;
import com.aoleyun.os.model.LoaderTask;
@@ -263,5 +262,16 @@ public class JGYUtils {
int aihuaUnlock = Settings.System.getInt(context.getContentResolver(), "Aihua_unlock_state", 0);
return locked == 1 || aihuaUnlock == 1;
}
public static boolean isDisable(Context context, String pkg) {
String aole_disable_app_list = Settings.Global.getString(context.getContentResolver(), "aole_disable_app_list");
if (TextUtils.isEmpty(aole_disable_app_list)) {
return false;
} else {
HashSet<String> appSet = new HashSet<>(Arrays.asList(aole_disable_app_list.split(",")));
return appSet.contains(pkg);
}
}
}