version:G10P 1.0.2
fix: update:华瑞安G10P适配
This commit is contained in:
@@ -974,6 +974,9 @@ public class ApkUtils {
|
||||
this.add("com.ckl.fcfilemanager");
|
||||
|
||||
this.add("com.iflytek.inputmethod");
|
||||
this.add("com.wyt.wangkexueximvvm1");
|
||||
this.add("com.android.stk");
|
||||
this.add("com.shoufei.aole");
|
||||
}};
|
||||
|
||||
public static void showAllAPP(Context context) {
|
||||
|
||||
@@ -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 {
|
||||
//爱华设置,暂时屏蔽
|
||||
|
||||
@@ -325,9 +325,10 @@ public class SysSettingUtils {
|
||||
case 1:
|
||||
navigationStatus = CommonConfig.AOLE_ACTION_HIDE_NAVIGATION_BAR;
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
Intent navIntent = new Intent(navigationStatus);
|
||||
// Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
context.sendBroadcast(navIntent);
|
||||
|
||||
|
||||
@@ -346,8 +347,10 @@ public class SysSettingUtils {
|
||||
case 1:
|
||||
statusbarStatus = CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
Intent statusIntent = new Intent(statusbarStatus);
|
||||
// Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
context.sendBroadcast(statusIntent);
|
||||
}
|
||||
}
|
||||
@@ -367,8 +370,10 @@ public class SysSettingUtils {
|
||||
case 1:
|
||||
navigationStatus = CommonConfig.AOLE_ACTION_HIDE_NAVIGATION_BAR;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
// Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
Intent navIntent = new Intent(navigationStatus);
|
||||
context.sendBroadcast(navIntent);
|
||||
|
||||
|
||||
@@ -387,8 +392,10 @@ public class SysSettingUtils {
|
||||
case 1:
|
||||
statusbarStatus = CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
Intent statusIntent = new Intent(statusbarStatus);
|
||||
// Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
context.sendBroadcast(statusIntent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ public class Utils {
|
||||
Log.e("getSerial", "读取设备序列号异常:" + e.toString());
|
||||
}
|
||||
if (BuildConfig.DEBUG) {
|
||||
// return "QNG2DKB00463";
|
||||
return "LTPKD22110000051";
|
||||
// serial = "012345679ABCDEF";
|
||||
}
|
||||
if (NOSN.equalsIgnoreCase(serial)) {
|
||||
@@ -1309,12 +1309,17 @@ public class Utils {
|
||||
|
||||
@SuppressLint("HardwareIds")
|
||||
public static String getIMEI(Context context, int slotIndex) {
|
||||
String imei;
|
||||
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
return tm.getImei(slotIndex);
|
||||
imei = tm.getImei(slotIndex);
|
||||
} else {
|
||||
return tm.getDeviceId(slotIndex);
|
||||
imei = tm.getDeviceId(slotIndex);
|
||||
}
|
||||
if (TextUtils.isEmpty(imei)) {
|
||||
return "暂无数据";
|
||||
}
|
||||
return imei;
|
||||
}
|
||||
|
||||
@SuppressLint("HardwareIds")
|
||||
@@ -1695,11 +1700,11 @@ public class Utils {
|
||||
* @return
|
||||
*/
|
||||
public static String getCustomVersion() {
|
||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
|
||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform) {
|
||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTKPlatform) {
|
||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTKPlatform
|
||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTK11Platform
|
||||
) {
|
||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||
} else {
|
||||
return Utils.getProperty("ro.custom.build.version", "获取失败");
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.aoleyun.sn.bean.WiFiAlias;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
@@ -176,7 +177,7 @@ public class WiFiUtils {
|
||||
|
||||
|
||||
synchronized public static void saveWiFiPasswd(List<WiFiAlias> passwd) {
|
||||
String jsonString = MMKV.defaultMMKV().decodeString("WiFiPassword", "");
|
||||
String jsonString = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE).decodeString("WiFiPassword", "");
|
||||
Log.e(TAG, "saveWiFiPasswd: " + jsonString);
|
||||
Gson gson = new Gson();
|
||||
Type listType = new TypeToken<List<WiFiAlias>>() {
|
||||
|
||||
Reference in New Issue
Block a user