1.4.0202 增加易学派平台
This commit is contained in:
@@ -791,6 +791,7 @@ public class ApkUtils {
|
||||
this.add("com.gl.dwlauncher");
|
||||
this.add("com.qunyu.dividedroad");
|
||||
this.add("com.ygyb.yischool");
|
||||
this.add("com.yxxmk.uiui");
|
||||
this.add("com.uiui.floatwindow");
|
||||
this.add("com.uiuipad.find");
|
||||
this.add("com.uiuipad.appstore");
|
||||
|
||||
@@ -133,6 +133,7 @@ public class JGYUtils {
|
||||
public static final int HRAD13Platform = 11;
|
||||
public static final int G10PPlatform = 12;
|
||||
public static final int C2Platform = 13;
|
||||
public static final int YXPD1Platform = 15;
|
||||
|
||||
|
||||
public static final String Other = "其他";
|
||||
@@ -146,6 +147,7 @@ public class JGYUtils {
|
||||
public static final String HRAD13Tag = "HRAD13";
|
||||
public static final String G10PTag = "G10P";
|
||||
public static final String C2Tag = "MTK8183";
|
||||
public static final String YXPD1TAG = "YXPD1";
|
||||
|
||||
|
||||
private CacheHelper cacheHelper;
|
||||
@@ -261,6 +263,9 @@ public class JGYUtils {
|
||||
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "C2");
|
||||
return C2Platform;
|
||||
} else if (YXPD1TAG.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "YXPD1");
|
||||
return YXPD1Platform;
|
||||
} else {
|
||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||
return UnknowPlatform;
|
||||
@@ -303,6 +308,8 @@ public class JGYUtils {
|
||||
getAppPlatformCallback.AppPlatform(G10PPlatform);
|
||||
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(C2Platform);
|
||||
} else if (YXPD1TAG.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(YXPD1Platform);
|
||||
} else {
|
||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||
}
|
||||
@@ -1209,8 +1216,13 @@ public class JGYUtils {
|
||||
}};
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public void writeAppPackageList(Context context, String packageList) {
|
||||
ApkUtils.addShortcut(context);
|
||||
public void writeAppPackageList(String packageList) {
|
||||
if (isUnlocked(mContext)) {
|
||||
addAppInstallWhiteList(new ArrayList<>());
|
||||
setAppRestriction(0);
|
||||
return;
|
||||
}
|
||||
ApkUtils.addShortcut(mContext);
|
||||
HashSet<String> pkgSet = new HashSet<>(Arrays.asList(packageList.split(",")));
|
||||
pkgSet.addAll(defaultPackages);
|
||||
pkgSet.addAll(ApkUtils.desktopAPP);
|
||||
@@ -1230,6 +1242,11 @@ public class JGYUtils {
|
||||
}
|
||||
|
||||
public void writeAppPackageList() {
|
||||
if (isUnlocked(mContext)) {
|
||||
addAppInstallWhiteList(new ArrayList<>());
|
||||
setAppRestriction(0);
|
||||
return;
|
||||
}
|
||||
HashSet<String> pkgSet = new HashSet<>(defaultPackages);
|
||||
pkgSet.addAll(ApkUtils.desktopAPP);
|
||||
pkgSet.addAll(ApkUtils.aoleyunAPP);
|
||||
@@ -1453,8 +1470,8 @@ public class JGYUtils {
|
||||
) {
|
||||
return;
|
||||
}
|
||||
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
||||
if (locked == 1) {
|
||||
|
||||
if (isUnlocked(mContext)) {
|
||||
return;
|
||||
}
|
||||
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
||||
@@ -1569,6 +1586,7 @@ public class JGYUtils {
|
||||
*/
|
||||
public void hideSystemAPP() {
|
||||
PackageManager pm = mContext.getPackageManager();
|
||||
pm.setApplicationEnabledSetting("com.yxxmk.uiui", PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
|
||||
Intent filterIntent = new Intent(Intent.ACTION_MAIN, null);
|
||||
//Intent.CATEGORY_LAUNCHER主要的过滤条件
|
||||
filterIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
@@ -1583,6 +1601,7 @@ public class JGYUtils {
|
||||
}
|
||||
if (!showAppList.contains(pkg)
|
||||
&& !ApkUtils.aoleyunAPP.contains(pkg)
|
||||
&& !ApkUtils.desktopAPP.contains(pkg)
|
||||
&& !ApkUtils.aihuaApp.contains(pkg)
|
||||
) {
|
||||
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||
@@ -1752,6 +1771,7 @@ public class JGYUtils {
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||
) {
|
||||
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state == 1 ? 0 : 1);
|
||||
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state == 1 ? 0 : 1);
|
||||
@@ -2823,6 +2843,11 @@ public class JGYUtils {
|
||||
}};
|
||||
|
||||
|
||||
public static boolean isUnlocked(Context context) {
|
||||
int locked = Settings.System.getInt(context.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
return locked == JGYActions.FRAME_CODE_UNLOCKED;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/禁用MTP数据传输功能
|
||||
*
|
||||
@@ -2895,7 +2920,7 @@ public class JGYUtils {
|
||||
*
|
||||
* @param pattern 0:普通模式(黑白名单都不生效),1:黑名单模式,2:白名单模式
|
||||
**/
|
||||
void setAppRestriction(int pattern) {
|
||||
public void setAppRestriction(int pattern) {
|
||||
if (C2Tag.equals(BuildConfig.platform)) {
|
||||
Log.e("ITools", "setAppRestriction: " + pattern);
|
||||
try {
|
||||
@@ -2924,7 +2949,7 @@ public class JGYUtils {
|
||||
*
|
||||
* @param packageNameList 包名列表
|
||||
**/
|
||||
void addAppInstallWhiteList(List<String> packageNameList) {
|
||||
public void addAppInstallWhiteList(List<String> packageNameList) {
|
||||
if (C2Tag.equals(BuildConfig.platform)) {
|
||||
Log.e("ITools", "addAppInstallWhiteList: " + packageNameList);
|
||||
try {
|
||||
|
||||
@@ -1772,6 +1772,7 @@ public class Utils {
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||
) {
|
||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user