diff --git a/app/build.gradle b/app/build.gradle index 86654a2..a80eda0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,8 +29,8 @@ android { defaultConfig { applicationId "com.aoleyun.sn" - versionCode 129 - versionName "1.4.0509" + versionCode 130 + versionName "1.4.0515" //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature. minSdkVersion 24 diff --git a/app/src/main/java/com/aoleyun/sn/base/BaseActivityLight.java b/app/src/main/java/com/aoleyun/sn/base/BaseActivityLight.java deleted file mode 100644 index 4ee6e06..0000000 --- a/app/src/main/java/com/aoleyun/sn/base/BaseActivityLight.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.aoleyun.sn.base; - -import android.os.Bundle; - -import androidx.annotation.CallSuper; -import androidx.annotation.Nullable; - -import com.aoleyun.sn.R; -import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX; - -public abstract class BaseActivityLight extends BaseRxActivity { - - public BaseActivityLight() { - super(); - } - - @Override - @CallSuper - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); -// StatusBarUtil.init(this); - UltimateBarX.statusBar(this) - .transparent() - .colorRes(R.color.colorPrimaryDark) - .light(true) - .apply(); - UltimateBarX.navigationBar(this) - .transparent() - .colorRes(R.color.colorPrimaryDark) - .light(true) - .apply(); - } - - /** - * 设置布局 - */ - protected abstract int getLayoutId(); -} \ No newline at end of file diff --git a/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java b/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java index a0d46cf..d8f19f0 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java @@ -410,6 +410,7 @@ public class ApkUtils { this.add("com.shoufei.aole"); this.add("com.ygyb.yischool"); + this.add("com.gaomuxuexi34"); }}; diff --git a/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java b/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java index 43b5101..5eb0a14 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java @@ -2022,6 +2022,7 @@ public class JGYUtils { public void openOTA() { Intent intent = new Intent(Intent.ACTION_MAIN); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); /*知道要跳转应用的包命与目标Activity*/ ComponentName componentName = new ComponentName("com.adups.fota", "com.adups.fota.GoogleOtaClient"); intent.setComponent(componentName); diff --git a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java index 83ab2a5..f7cd94b 100644 --- a/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java +++ b/app/src/main/java/com/aoleyun/sn/utils/SysSettingUtils.java @@ -77,10 +77,12 @@ public class SysSettingUtils { Log.e("setDisableSetting", "Close all settings: "); setPhoneList(context, 1); setUSBstate(context, 1); - if (JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.YXPD1TAG)) { - setBluetooth(context, 1); - } else { + if (JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.YXPD1TAG) + || JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.C2Tag) + ) { setBluetooth(context, 0); + } else { + setBluetooth(context, 1); } setHotspot(context, 1); setBar(context, 1); @@ -324,7 +326,7 @@ public class SysSettingUtils { Log.e(TAG, "setBluetooth: setting_bhtvideo no changed"); } - JGYUtils.getInstance().setBluetoothEnable(state == 1); + JGYUtils.getInstance().setBluetoothEnable(state == 0); } /** @@ -367,13 +369,15 @@ public class SysSettingUtils { if (old_setting_bhtvideo != setting_bhtvideo) { mmkv.encode(CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_bhtvideo); - String setting_context = jsonObject.get("setting_context").getAsString(); if (setting_bhtvideo == 0) { - if (null != setting_context && !"".equals(setting_context) && !" ".equals(setting_context) && !"null".equals(setting_context)) { - Log.e(TAG, "setting_context:" + setting_context); - Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_context); - } else { - Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty"); + if (jsonObject.get("setting_context").isJsonNull()) { + String setting_context = jsonObject.get("setting_context").getAsString(); + if (null != setting_context && !"".equals(setting_context) && !" ".equals(setting_context) && !"null".equals(setting_context)) { + Log.e(TAG, "setting_context:" + setting_context); + Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_context); + } else { + Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty"); + } } } else if (setting_bhtvideo == 1) { Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty"); @@ -382,7 +386,7 @@ public class SysSettingUtils { Log.e(TAG, "setBluetooth: setting_bhtvideo no changed"); } - JGYUtils.getInstance().setBluetoothEnable(setting_bht == 1); + JGYUtils.getInstance().setBluetoothEnable(setting_bht == 0); } private static void setHotspot(Context context, int state) {