version:6.3

fix:修复检查应用版本报错,修复cube开发者选项失效
update:更新cube sdk
This commit is contained in:
2022-07-22 16:19:49 +08:00
parent 19c9dfc2fc
commit 5edeeb6fd4
5 changed files with 33 additions and 9 deletions

View File

@@ -80,8 +80,8 @@ android {
//酷比魔方 //酷比魔方
cube { cube {
flavorDimensions "default" flavorDimensions "default"
versionCode 52 versionCode 55
versionName "6.1" versionName "6.3"
buildConfigField "String", "platform", '"ZhanRuiCube"' buildConfigField "String", "platform", '"ZhanRuiCube"'
} }
@@ -237,6 +237,7 @@ dependencies {
// implementation fileTree(dir: "libs", include: ["*.jar"]) // implementation fileTree(dir: "libs", include: ["*.jar"])
compileOnly files('libs/framework.jar') compileOnly files('libs/framework.jar')
compileOnly files('libs/cube_mdm.jar') compileOnly files('libs/cube_mdm.jar')
compileOnly files('libs/cube_sdk_v1.0.0.jar')
implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'

Binary file not shown.

View File

@@ -1681,6 +1681,13 @@ public class NetInterfaceManager {
SPUtils.put(mContext, "default_launcher", defaultApp.getDefault_launcher()); SPUtils.put(mContext, "default_launcher", defaultApp.getDefault_launcher());
} }
} else { } else {
String default_launcher = (String) SPUtils.get(mContext, "default_launcher", "");
Log.e("getDefaultApp", "onNext: " + default_launcher);
if (TextUtils.isEmpty(default_launcher)) {
JGYUtils.getInstance().setDefaultDesktop();
} else {
JGYUtils.getInstance().setDefaultDesktop(default_launcher);
}
Log.e("getDefaultApp", "onNext: " + defaultAppBaseResponse.msg); Log.e("getDefaultApp", "onNext: " + defaultAppBaseResponse.msg);
} }
} }

View File

@@ -453,6 +453,9 @@ public class JGYUtils {
} }
private void checkPackageAndVersion(HashSet<String> disallowUpgrade, List<AppListInfo> appListInfos) { private void checkPackageAndVersion(HashSet<String> disallowUpgrade, List<AppListInfo> appListInfos) {
if (appListInfos == null || appListInfos.size() == 0) {
return;
}
Log.e(TAG, "checkPackageAndVersion: " + disallowUpgrade); Log.e(TAG, "checkPackageAndVersion: " + disallowUpgrade);
PackageManager pm = mContext.getPackageManager(); PackageManager pm = mContext.getPackageManager();
HashMap<String, AppListInfo> listInfoHashMap = new HashMap<>(); HashMap<String, AppListInfo> listInfoHashMap = new HashMap<>();
@@ -1580,7 +1583,9 @@ public class JGYUtils {
Log.e(TAG, "getDeveloper: " + state); Log.e(TAG, "getDeveloper: " + state);
if (!BuildConfig.DEBUG) { if (!BuildConfig.DEBUG) {
Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state); Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) { if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform
) {
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state == 1 ? 0 : 1); 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); Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state == 1 ? 0 : 1);
} }
@@ -1778,7 +1783,6 @@ public class JGYUtils {
// } // }
// } // }
// } // }
public void removeAllTask() { public void removeAllTask() {
List<ActivityManager.RecentTaskInfo> list = getRecentTasks(ActivityManager.getMaxRecentTasksStatic(), getCurrentUserId()); List<ActivityManager.RecentTaskInfo> list = getRecentTasks(ActivityManager.getMaxRecentTasksStatic(), getCurrentUserId());
for (ActivityManager.RecentTaskInfo info : list) { for (ActivityManager.RecentTaskInfo info : list) {
@@ -2031,7 +2035,19 @@ public class JGYUtils {
} }
} }
//设置默认桌面 /**
* 设置奥乐云桌面为默认
*/
public void setDefaultDesktop() {
setDefaultDesktop(PackageNames.DESKTOP);
}
/**
* 设置默认桌面
*
* @param pkg
*/
public void setDefaultDesktop(String pkg) { public void setDefaultDesktop(String pkg) {
Log.e(TAG, "setDefaultDesktop: " + pkg); Log.e(TAG, "setDefaultDesktop: " + pkg);
if (TextUtils.isEmpty(pkg)) { if (TextUtils.isEmpty(pkg)) {

View File

@@ -5,7 +5,7 @@ import android.app.StatusBarManager;
import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothAdapter;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.mdm.SuperPower; import android.cube.SuperPower;
import android.os.Build; import android.os.Build;
import android.provider.Settings; import android.provider.Settings;
import android.text.TextUtils; import android.text.TextUtils;
@@ -162,7 +162,7 @@ public class SysSettingUtils {
if (!BuildConfig.DEBUG) { if (!BuildConfig.DEBUG) {
try { try {
SuperPower mService = (SuperPower) context.getSystemService("mdm"); SuperPower mService = (SuperPower) context.getSystemService("mdm");
mService.setUSBDataDisabled(true); mService.setUsbDataDisabled(true);
boolean aole_usb_choose = Settings.System.putString(context.getContentResolver(), "aole_usb_choose", "usb_charge"); boolean aole_usb_choose = Settings.System.putString(context.getContentResolver(), "aole_usb_choose", "usb_charge");
Log.e(TAG, "aole_usb_choose:" + aole_usb_choose); Log.e(TAG, "aole_usb_choose:" + aole_usb_choose);
String usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE; String usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE;
@@ -185,10 +185,10 @@ public class SysSettingUtils {
SuperPower mService = (SuperPower) context.getSystemService("mdm"); SuperPower mService = (SuperPower) context.getSystemService("mdm");
switch (setting_usb) { switch (setting_usb) {
case "usb_charge": case "usb_charge":
mService.setUSBDataDisabled(true); mService.setUsbDataDisabled(true);
break; break;
case "usb_mtp": case "usb_mtp":
mService.setUSBDataDisabled(false); mService.setUsbDataDisabled(false);
break; break;
default: default:
} }