version:
bugfixes:使用jclasslib降级jar,对接全志酷比接口
This commit is contained in:
@@ -18,6 +18,7 @@ import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.cubemdm.cubemdmmanager.CubeMdmManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
@@ -2067,6 +2068,10 @@ public class JgyUtils {
|
||||
if (Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0) != state) {
|
||||
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state);
|
||||
}
|
||||
if (JgyUtils.isAllWinnerDevice()) {
|
||||
CubeMdmManager cubeMdmManager = (CubeMdmManager) mContext.getSystemService("cube_mdm");
|
||||
cubeMdmManager.setDeveloperEnable(state == 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2735,6 +2740,11 @@ public class JgyUtils {
|
||||
// }
|
||||
intent.setPackage("com.android.settings");
|
||||
mContext.sendBroadcast(intent);
|
||||
if (JgyUtils.isAllWinnerDevice()) {
|
||||
CubeMdmManager cubeMdmManager = (CubeMdmManager) mContext.getSystemService("cube_mdm");
|
||||
cubeMdmManager.setDefaultLauncher(pkg);
|
||||
}
|
||||
|
||||
// ApkUtils.openPackage(mContext, pkg);
|
||||
Log.e(TAG, "setDefaultDesktop: " + pkg + ":" + className);
|
||||
Log.e(TAG, "setDefaultDesktop: " + "persist.sys.launcher.pkgname = " + SystemProperties.get("persist.sys.launcher.pkgname"));
|
||||
@@ -3053,6 +3063,11 @@ public class JgyUtils {
|
||||
return getHardware().startsWith(UNISOC_HARDWARE) && Build.BRAND.equalsIgnoreCase(CUBE_BRAND);
|
||||
}
|
||||
|
||||
public static boolean isAllWinnerDevice() {
|
||||
return JgyUtils.getInstance().checkAppPlatform() == U1302Platform;
|
||||
}
|
||||
|
||||
|
||||
public boolean isScreenOn() {
|
||||
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
|
||||
//true为打开,false为关闭
|
||||
|
||||
Reference in New Issue
Block a user