version:G10P 1.0.2

fix:
update:华瑞安G10P适配
This commit is contained in:
2023-03-30 10:08:02 +08:00
parent 93f87d3b68
commit e5cdbc2ecc
24 changed files with 912 additions and 541 deletions

View File

@@ -109,22 +109,21 @@ public class JGYUtils {
@SuppressLint("StaticFieldLeak")
private static JGYUtils sInstance;
private MMKV mMMKV = MMKV.defaultMMKV();
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
private Context mContext;
private ContentResolver crv;
public static int UnknowPlatform = 0;
public static int MTKPlatform = 1;
// TODO: 2022/4/23 标签替换未完成
public static int CubePlatform = 2;
public static int ZhanruiPlatform = 3;
public static final int UnknowPlatform = 0;
public static final int MTKPlatform = 1;
public static final int CubePlatform = 2;
public static final int ZhanruiPlatform = 3;
public static final int MTK11Platform = 5;
public static String Other = "其他";
public static String MTKTag = "MTK";
// TODO: 2022/4/23 标签替换未完成
public static String CubeTag = "展锐cube";
public static String ZhanruiTag = "展锐";
public static final String Other = "其他";
public static final String MTKTag = "MTK";
public static final String CubeTag = "展锐cube";
public static final String ZhanruiTag = "展锐";
public static final String MTK11Tag = "MTK11";
private CacheHelper cacheHelper;
@@ -179,8 +178,11 @@ public class JGYUtils {
Log.i(TAG, "checkAppPlatform: " + "展锐平台");
return ZhanruiPlatform;
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "酷比平台");
Log.i(TAG, "checkAppPlatform: " + "ZhanRuiCube");
return CubePlatform;
} else if ("MTK11".equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "MTK11");
return MTK11Platform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -208,6 +210,8 @@ public class JGYUtils {
getAppPlatformCallback.AppPlatform(ZhanruiPlatform);
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(CubePlatform);
} else if ("MTK11".equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(MTK11Platform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
@@ -221,6 +225,8 @@ public class JGYUtils {
return ZhanruiTag;
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
return CubeTag;
} else if ("MTK11".equalsIgnoreCase(platform)) {
return MTK11Tag;
} else {
return Other;
}
@@ -1344,6 +1350,10 @@ public class JGYUtils {
//删除用户除了在应用市场的其他应用
public void deleteOtherApp() {
Log.e(TAG, "deleteOtherApp: " + Build.MODEL);
if ("K106".equals(Build.MODEL)) {
return;
}
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
if (locked == 1) {
return;
@@ -2071,16 +2081,26 @@ public class JGYUtils {
* @param pkg
*/
public void setDefaultDesktop(String pkg) {
// Log.e(TAG, "setDefaultDesktop: " + pkg);
// if (TextUtils.isEmpty(pkg)) {
// openLauncher3();
// } else {
// String className = getStartClassName(pkg);
// if (TextUtils.isEmpty(className)) {
// openLauncher3();
// } else {
// setDefaultDesktop(pkg, className);
// }
// }
}
public void setJxwLauncher(String pkg) {
Log.e(TAG, "setDefaultDesktop: " + pkg);
if (TextUtils.isEmpty(pkg)) {
openLauncher3();
String className = getStartClassName(pkg);
if (TextUtils.isEmpty(className)) {
Log.e(TAG, "setJxwLauncher: empty");
} else {
String className = getStartClassName(pkg);
if (TextUtils.isEmpty(className)) {
openLauncher3();
} else {
setDefaultDesktop(pkg, className);
}
setDefaultDesktop(pkg, className);
}
}
@@ -2126,7 +2146,7 @@ public class JGYUtils {
public void setDefaultDesktop(String pkg, String className) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
setRoleHolderAsUser(mContext, pkg);
// setRoleHolderAsUser(mContext, pkg);
Log.e(TAG, "setDefaultDesktop: setRoleHolderAsUser");
} else {
//爱华设置,暂时屏蔽