version:1.5.0821
bugfixes: add:优化sn显示,增加mt6765平台
This commit is contained in:
@@ -188,13 +188,13 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
}
|
||||
|
||||
private void getIMEI() {
|
||||
if (!Utils.NOSN.equalsIgnoreCase(Utils.getSerial(this))) {
|
||||
mViewDataBinding.tvImei.setText(Utils.getIMEI(this, 1));
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(Utils.getIMEI(this, 1))) {
|
||||
mViewDataBinding.tvImei.setText(Utils.getIMEI(this, 1));
|
||||
}
|
||||
}
|
||||
// if (!Utils.NOSN.equalsIgnoreCase(Utils.getSerial(this))) {
|
||||
// mViewDataBinding.tvImei.setText(Utils.getIMEI(this, 1));
|
||||
// } else {
|
||||
// if (!TextUtils.isEmpty(Utils.getIMEI(this, 1))) {
|
||||
mViewDataBinding.tvImei.setText(Utils.getIMEI(this));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private void setMac() {
|
||||
@@ -248,6 +248,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mViewModel.getQrCode();
|
||||
mViewModel.setBindInfoPanel();
|
||||
mViewModel.getAppSettings();
|
||||
mViewModel.getPushTags();
|
||||
}
|
||||
|
||||
private void setObserve() {
|
||||
|
||||
@@ -344,4 +344,13 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getPushTags(){
|
||||
NetInterfaceManager.getInstance().setPushTags(getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ public class BaseApplication extends MultiDexApplication {
|
||||
Log.e(TAG, "mmkv root: " + rootDir);
|
||||
// 初始化 Toast 框架
|
||||
Toaster.init(this);
|
||||
JgyUtils.init(this);
|
||||
|
||||
CrashReport.initCrashReport(getApplicationContext(), "b16b3c7f1a", false);
|
||||
CrashReport.setDeviceId(this, Utils.getSerial(this));
|
||||
CrashReport.setDeviceModel(this, Utils.getSerial(this));
|
||||
@@ -74,7 +76,6 @@ public class BaseApplication extends MultiDexApplication {
|
||||
initAliasObservable();
|
||||
initTagObservable();
|
||||
aliyunPushInit();
|
||||
JgyUtils.init(this);
|
||||
NetInterfaceManager.init(this);
|
||||
if (JgyUtils.isAllWinnerDevice()) {
|
||||
AllwinnerCubeMdmManager.init(this);
|
||||
|
||||
@@ -12,6 +12,7 @@ public class PackageNames {
|
||||
public static final String DEVICE_INFO = "com.aoleyun.sn";
|
||||
public static final String APPSTORE = "com.aoleyun.appstore";
|
||||
public static final String DESKTOP = "com.aoleyun.os";
|
||||
public static final String NEUTRAL_DESKTOP = "com.aly.os";
|
||||
public static final String ALLWINNER_15_DESKTOP = "com.schoolos.cmcc";
|
||||
public static final String AIUDUDESKTOP = "com.aoleyun.audos";
|
||||
public static final String NOTIFICATIONS = "com.aoleyun.info";
|
||||
|
||||
@@ -941,29 +941,22 @@ public class NetInterfaceManager {
|
||||
* @param callback
|
||||
*/
|
||||
public void checkAoleyunUpdate(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = getUpdateApi().getUpdate(PackageNames.APPSTORE, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable;
|
||||
if (JgyUtils.getInstance().isAiuduPlatform()) {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else if (JgyUtils.isAllWinnerDevice()) {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.ALLWINNER_15_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.ALLWINNER_15_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.NEUTRAL_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
}
|
||||
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.BROWSER, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.LEARNING_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.AILOG, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = getUpdateApi().getUpdate(PackageNames.BROWSER, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = getUpdateApi().getUpdate(PackageNames.LEARNING_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = getUpdateApi().getUpdate(PackageNames.AILOG, JgyUtils.getInstance().checkAppPlatform());
|
||||
|
||||
Observable.zip(infoUpdateObservable, storeUpdateObservable, desktopUpdateObservable,
|
||||
notifyUpdateObservable, browserUpdateObservable, ailogUpdateObservable,
|
||||
@@ -1039,30 +1032,23 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void checkAoleyunUpdate(BehaviorSubject<ActivityEvent> lifecycle, UpdateCallback callback) {
|
||||
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = getUpdateApi().getUpdate(PackageNames.APPSTORE, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable;
|
||||
if (JgyUtils.getInstance().isAiuduPlatform()) {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else if (JgyUtils.isAllWinnerDevice()) {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.ALLWINNER_15_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.ALLWINNER_15_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.NEUTRAL_DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
} else {
|
||||
desktopUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
desktopUpdateObservable = getUpdateApi().getUpdate(PackageNames.DESKTOP, JgyUtils.getInstance().checkAppPlatform());
|
||||
}
|
||||
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.BROWSER, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(PackageNames.AILOG, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = getUpdateApi().getUpdate(PackageNames.BROWSER, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = getUpdateApi().getUpdate(PackageNames.AILOG, JgyUtils.getInstance().checkAppPlatform());
|
||||
String desktop = mMMKV.decodeString(CommonConfig.DEFAULT_DESKTOP_PACKAGE);
|
||||
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = NetInterfaceManager.getInstance()
|
||||
.getUpdateApi().getUpdate(desktop, JgyUtils.getInstance().checkAppPlatform());
|
||||
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = getUpdateApi().getUpdate(desktop, JgyUtils.getInstance().checkAppPlatform());
|
||||
|
||||
Observable.zip(infoUpdateObservable, storeUpdateObservable, desktopUpdateObservable,
|
||||
notifyUpdateObservable, browserUpdateObservable, learningDesktopObservable, ailogUpdateObservable,
|
||||
@@ -2500,6 +2486,8 @@ public class NetInterfaceManager {
|
||||
) {
|
||||
JgyUtils.getInstance().showApp(PackageNames.YIXUEPAI_DESKTOP);
|
||||
JgyUtils.getInstance().setYxpDefaultDesktop();
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
JgyUtils.getInstance().setDefaultDesktop("com.aly.os");
|
||||
}
|
||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
// Settings.System.putInt(mContext.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, 0);
|
||||
@@ -2770,6 +2758,8 @@ public class NetInterfaceManager {
|
||||
tagSets.add(JgyUtils.seewoTag);
|
||||
} else if (platform == JgyUtils.U1302Platform) {
|
||||
tagSets.add(JgyUtils.allwinner_U1302);
|
||||
} else if (platform == JgyUtils.MT6765Platform) {
|
||||
tagSets.add(JgyUtils.MT6765_TAG);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -4070,8 +4060,7 @@ public class NetInterfaceManager {
|
||||
Log.e("sendAppUsedTime", e.getMessage());
|
||||
}
|
||||
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAppLogApi()
|
||||
getAppLogApi()
|
||||
.getAppLog(Utils.getSerial(mContext), random, data.toString())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -4187,7 +4176,7 @@ public class NetInterfaceManager {
|
||||
|
||||
public void getPublicIp(BehaviorSubject<ActivityEvent> lifecycle, PublicIpCallbak callbak) {
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.client(NetInterfaceManager.getInstance().getOkHttpClient())
|
||||
.client(getOkHttpClient())
|
||||
.baseUrl(UrlAddress.PCONLINE_WHOIS)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||
|
||||
@@ -109,7 +109,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void setPushTags() {
|
||||
NetInterfaceManager.getInstance().setPushTags(false, getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
NetInterfaceManager.getInstance().setPushTags( getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
mView.setTagsFinish(TextUtils.isEmpty(tag));
|
||||
|
||||
@@ -74,6 +74,7 @@ public class ApkUtils {
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.audos");
|
||||
this.add("com.aoleyun.os");
|
||||
this.add("com.aly.os");
|
||||
this.add("com.aoleyun.ailog");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.uiui.filecloud");
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.content.ContextWrapper;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -163,6 +164,7 @@ public class JgyUtils {
|
||||
public static final int P50Platform = 23;
|
||||
public static final int seewoPlatform = 25;
|
||||
public static final int U1302Platform = 26;
|
||||
public static final int MT6765Platform = 28;
|
||||
|
||||
|
||||
public static final String Other = "其他";
|
||||
@@ -186,6 +188,7 @@ public class JgyUtils {
|
||||
public static final String P50Tag = "P50TD";
|
||||
public static final String seewoTag = "seewo";
|
||||
public static final String allwinner_U1302 = "QZA15";
|
||||
public static final String MT6765_TAG = "MT6765";
|
||||
|
||||
|
||||
private CacheHelper cacheHelper;
|
||||
@@ -331,6 +334,9 @@ public class JgyUtils {
|
||||
} else if (allwinner_U1302.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "U1302");
|
||||
return U1302Platform;
|
||||
} else if (MT6765_TAG.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "MT6765");
|
||||
return MT6765Platform;
|
||||
} else {
|
||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||
return UnknowPlatform;
|
||||
@@ -393,6 +399,8 @@ public class JgyUtils {
|
||||
getAppPlatformCallback.AppPlatform(seewoPlatform);
|
||||
} else if (allwinner_U1302.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(U1302Platform);
|
||||
} else if (MT6765_TAG.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(MT6765Platform);
|
||||
} else {
|
||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||
}
|
||||
@@ -1391,7 +1399,7 @@ public class JgyUtils {
|
||||
if (TextUtils.isEmpty(data)) {
|
||||
Log.e(TAG, "SettingSysData: " + "data is empty");
|
||||
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
if (locked==JGYActions.FRAME_CODE_LOCKED) {
|
||||
if (locked == JGYActions.FRAME_CODE_LOCKED) {
|
||||
SysSettingUtils.setDisableSetting(mContext);
|
||||
}
|
||||
SPUtils.put(mContext, JGYActions.ACTION_STATUSBAR_STATUS, "");
|
||||
@@ -2095,11 +2103,11 @@ public class JgyUtils {
|
||||
Log.e(TAG, "setDeveloperOptions: state = " + state);
|
||||
|
||||
int oldStatu = Settings.System.getInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 0);
|
||||
if (oldStatu == state) {
|
||||
if (oldStatu == (state ^ 1)) {
|
||||
Log.e(TAG, "setDeveloperOptions: oldStatu = " + oldStatu + " no changed");
|
||||
}
|
||||
//这个需要反着来
|
||||
Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state);
|
||||
Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state ^ 1);
|
||||
|
||||
Log.e(TAG, "setDeveloperOptions: DEVELOPMENT_SETTINGS_ENABLED = " + Settings.Global.getInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0));
|
||||
Log.e(TAG, "setDeveloperOptions: ADB_ENABLED = " + Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0));
|
||||
@@ -2233,6 +2241,9 @@ public class JgyUtils {
|
||||
case JgyUtils.ZhanruiPlatform:
|
||||
intent.setComponent(new ComponentName("com.cube.update", "com.cube.update.GoogleOtaClient"));
|
||||
break;
|
||||
case JgyUtils.MT6765Platform:
|
||||
intent.setComponent(new ComponentName("com.waterworld.update", "com.waterworld.update.GoogleOtaClient"));
|
||||
break;
|
||||
}
|
||||
try {
|
||||
mContext.startActivity(intent);
|
||||
@@ -2531,6 +2542,9 @@ public class JgyUtils {
|
||||
private String schoolosOs = "com.schoolos.cmcc";
|
||||
private String schoolosClass = "com.schoolos.cmcc.activity.main.MainActivity";
|
||||
|
||||
private String AlyOs = "com.aly.os";
|
||||
private String AlyOsClass = "com.aly.os.Launcher";
|
||||
|
||||
public void setDefaultLauncher(Context context, String defPackageName, String defClassName) {
|
||||
try {
|
||||
if (!TextUtils.isEmpty(defPackageName) && !TextUtils.isEmpty(defClassName)) {
|
||||
@@ -2561,6 +2575,27 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefaultLauncher2(Context context, String pkg, String cls) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
ComponentName component = new ComponentName(pkg, cls);
|
||||
|
||||
// 创建 IntentFilter
|
||||
IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN);
|
||||
filter.addCategory(Intent.CATEGORY_HOME);
|
||||
filter.addCategory(Intent.CATEGORY_DEFAULT);
|
||||
|
||||
// 获取所有支持 HOME 的 Activity
|
||||
List<ResolveInfo> homeApps = pm.queryIntentActivities(new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME), 0);
|
||||
ComponentName[] components = new ComponentName[homeApps.size()];
|
||||
for (int i = 0; i < homeApps.size(); i++) {
|
||||
ActivityInfo ai = homeApps.get(i).activityInfo;
|
||||
components[i] = new ComponentName(ai.packageName, ai.name);
|
||||
}
|
||||
|
||||
// 替换默认桌面
|
||||
pm.replacePreferredActivity(filter, IntentFilter.MATCH_CATEGORY_EMPTY, components, component);
|
||||
}
|
||||
|
||||
public void setRoleHolderAsUser(Context context, String packageName) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
String roleName = "android.app.role.HOME";
|
||||
@@ -2604,10 +2639,14 @@ public class JgyUtils {
|
||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G11JPlatform
|
||||
) {
|
||||
JgyUtils.getInstance().setAiuduDefaultDesktop();
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
setDefaultDesktop(AlyOs, AlyOsClass);
|
||||
}
|
||||
} else {
|
||||
if (pkg.equalsIgnoreCase(desktopPkg)) {
|
||||
setDefaultDesktop(pkg);
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
setDefaultDesktop(AlyOs, AlyOsClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2702,6 +2741,8 @@ public class JgyUtils {
|
||||
setDefaultDesktop(AiUDuOs, AiUDuOsClass);
|
||||
} else if (JgyUtils.isAllWinnerDevice()) {
|
||||
setDefaultDesktop(schoolosOs, schoolosClass);
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
setDefaultDesktop(AlyOs, AlyOsClass);
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
|
||||
setDefaultDesktop(Launcher3, Launcher3QuickstepClass);
|
||||
@@ -2716,11 +2757,17 @@ public class JgyUtils {
|
||||
|| "C2".equals(Build.MODEL)) {
|
||||
ApkUtils.openPackage(mContext, AoleyunOs, AoleyunOsClass);
|
||||
} else if (JgyUtils.getInstance().isAiuduPlatform()) {
|
||||
setDefaultDesktop(AiUDuOs, AiUDuOsClass);
|
||||
ApkUtils.openPackage(mContext, AiUDuOs, AiUDuOsClass);
|
||||
} else if (JgyUtils.isAllWinnerDevice()) {
|
||||
setDefaultDesktop(schoolosOs, schoolosClass);
|
||||
ApkUtils.openPackage(mContext, schoolosOs, schoolosClass);
|
||||
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
|
||||
ApkUtils.openPackage(mContext, AlyOs, AlyOsClass);
|
||||
} else {
|
||||
ApkUtils.openPackage(mContext, Launcher3, Launcher3Class);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
|
||||
ApkUtils.openPackage(mContext, Launcher3, Launcher3QuickstepClass);
|
||||
} else {
|
||||
ApkUtils.openPackage(mContext, Launcher3, Launcher3Class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2761,9 +2808,12 @@ public class JgyUtils {
|
||||
}
|
||||
|
||||
public void setDefaultDesktop(String pkg, String className) {
|
||||
Log.e(TAG, "setDefaultDesktop: pkg=" + pkg + " className=" + className);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
setRoleHolderAsUser(mContext, pkg);
|
||||
Log.e(TAG, "setDefaultDesktop: setRoleHolderAsUser");
|
||||
} else if (Build.VERSION.SDK_INT >= 31) {
|
||||
setDefaultLauncher(mContext, pkg, className);
|
||||
} else {
|
||||
//爱华设置,暂时屏蔽
|
||||
// setDefaultLauncher(mContext, pkg, className);
|
||||
|
||||
@@ -797,17 +797,17 @@ public class Utils {
|
||||
* @return
|
||||
*/
|
||||
public static String getSerial(Context context) {
|
||||
if ("HL500".equals(Build.MODEL)) {
|
||||
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.HL500Platform) {
|
||||
return getIMEI(context);
|
||||
}
|
||||
if (TECLAST_BRAND.equalsIgnoreCase(Build.BRAND)) {
|
||||
return getPushMac(context);
|
||||
} else {
|
||||
if (NOSN.equalsIgnoreCase(getSn())) {
|
||||
return getIMEI(context);
|
||||
} else {
|
||||
// if (NOSN.equalsIgnoreCase(getSn())) {
|
||||
// return getIMEI(context);
|
||||
// } else {
|
||||
return getSn();
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1830,6 +1830,7 @@ public class Utils {
|
||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.P50Platform
|
||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform
|
||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.U1302Platform
|
||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform
|
||||
) {
|
||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||
} else {
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="@{appSettings==null||appSettings.custom_batch_control==0?View.GONE:View.VISIBLE}">
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
@@ -590,8 +590,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_system_version"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="30"
|
||||
|
||||
Reference in New Issue
Block a user