version:m40se 2.9.2

fix:修复m40se 管控失效问题,修复魔术appsd卡问题
update:优化网络请求
This commit is contained in:
2023-01-13 17:55:33 +08:00
parent 74a0f631e2
commit d7f0daa80c
12 changed files with 163 additions and 21 deletions

View File

@@ -73,8 +73,8 @@ android {
official { official {
flavorDimensions "default" flavorDimensions "default"
versionCode 28 versionCode 32
versionName "2.8" versionName "2.9.2"
} }
} }

View File

@@ -0,0 +1,13 @@
package com.fuying.sn.bean;
import java.io.Serializable;
public class SnBindState implements Serializable {
private static final long serialVersionUID = -4362927257861677376L;
int is_bind;
public int getIs_bind() {
return is_bind;
}
}

View File

@@ -28,6 +28,8 @@ public class CommonConfig {
public static final String KEY_IS_CONTROL = "is_control_key"; public static final String KEY_IS_CONTROL = "is_control_key";
public static final String DEVICES_IS_BIND_KEY = "is_bind_state";
/** /**
* 管控系统指令 * 管控系统指令
*/ */

View File

@@ -10,16 +10,15 @@ import android.provider.Settings;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import com.google.gson.JsonObject;
import com.tencent.mmkv.MMKV;
import com.fuying.sn.BuildConfig;
import com.fuying.sn.bean.SystemSettings; import com.fuying.sn.bean.SystemSettings;
import com.fuying.sn.config.CommonConfig; import com.fuying.sn.config.CommonConfig;
import com.fuying.sn.utils.ApkUtils;
import com.fuying.sn.gson.GsonUtils; import com.fuying.sn.gson.GsonUtils;
import com.fuying.sn.utils.ApkUtils;
import com.fuying.sn.utils.JGYUtils; import com.fuying.sn.utils.JGYUtils;
import com.fuying.sn.utils.SPUtils; import com.fuying.sn.utils.SPUtils;
import com.fuying.sn.utils.ToastUtil; import com.fuying.sn.utils.ToastUtil;
import com.google.gson.JsonObject;
import com.tencent.mmkv.MMKV;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
@@ -79,7 +78,7 @@ public class ControlManager {
setHotspot(systemSettings); setHotspot(systemSettings);
setBar(systemSettings); setBar(systemSettings);
setCamera(systemSettings); setCamera(systemSettings);
setTF(systemSettings); // setTF(systemSettings);
setIcon(systemSettings); setIcon(systemSettings);
setCanReset(systemSettings); setCanReset(systemSettings);
setDeveloperOptions(systemSettings); setDeveloperOptions(systemSettings);
@@ -109,7 +108,7 @@ public class ControlManager {
setHotspot(systemSettings); setHotspot(systemSettings);
setBar(systemSettings); setBar(systemSettings);
setCamera(systemSettings); setCamera(systemSettings);
setTF(systemSettings); // setTF(systemSettings);
setIcon(systemSettings); setIcon(systemSettings);
setCanReset(systemSettings); setCanReset(systemSettings);
setDeveloperOptions(systemSettings); setDeveloperOptions(systemSettings);
@@ -126,13 +125,14 @@ public class ControlManager {
*/ */
public void setDisableSetting() { public void setDisableSetting() {
Log.e("setDisableSetting", "Close all settings: "); Log.e("setDisableSetting", "Close all settings: ");
//蓝牙投屏gps热点默认打开 USB默认关闭
setUSBstate(1); setUSBstate(1);
setScreenShared(0); setScreenShared(0);
setPhoneList(1); setPhoneList(1);
setBluetooth(0); setBluetooth(0);
setHotspot(0); setHotspot(0);
setCamera(1); setCamera(1);
setTF(1); // setTF(1);
setIcon(1); setIcon(1);
setWallpaper(0); setWallpaper(0);
setCanReset(1); setCanReset(1);
@@ -243,9 +243,14 @@ public class ControlManager {
boolean aole_white_list_Array = Settings.System.putString(mResolver, CommonConfig.AOLE_ACTION_WHITE_LIST_ARRAY, setting_phones); boolean aole_white_list_Array = Settings.System.putString(mResolver, CommonConfig.AOLE_ACTION_WHITE_LIST_ARRAY, setting_phones);
Log.e("SystemSetting", "aole_white_list_Array: " + aole_white_list_Array + "=" + setting_phones); Log.e("SystemSetting", "aole_white_list_Array: " + aole_white_list_Array + "=" + setting_phones);
int setting_memory = changeNum(settings.getSetting_memory()); if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
boolean aole_sdcard_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, setting_memory); Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, 0);
Log.e("SystemSetting", "aole_sdcard_forbid_on: " + setting_memory); } else {
int setting_memory = changeNum(settings.getSetting_memory());
boolean aole_sdcard_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, setting_memory);
Log.e("SystemSetting", "aole_sdcard_forbid_on: " + setting_memory);
}
} }
private void setPhoneList(int state) { private void setPhoneList(int state) {
@@ -260,14 +265,19 @@ public class ControlManager {
boolean aole_white_list_Array = Settings.System.putString(mResolver, CommonConfig.AOLE_ACTION_WHITE_LIST_ARRAY, ""); boolean aole_white_list_Array = Settings.System.putString(mResolver, CommonConfig.AOLE_ACTION_WHITE_LIST_ARRAY, "");
// ToastTool.show("qch_call_forbid::"+setting_call+"----setting_phones::"+setting_phones+"----"+aole_white_list_Array+"---"+qch_call_forbid); // ToastTool.show("qch_call_forbid::"+setting_call+"----setting_phones::"+setting_phones+"----"+aole_white_list_Array+"---"+qch_call_forbid);
Log.e(TAG, "aole_white_list_Array:" + aole_white_list_Array + "---" + aole_white_list_Array); Log.e(TAG, "aole_white_list_Array:" + aole_white_list_Array + "---" + aole_white_list_Array);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
boolean aole_sdcard_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, state); Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, 0);
Log.e(TAG, "aole_sdcard_forbid_on:" + aole_sdcard_forbid_on); } else {
boolean aole_sdcard_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, state);
Log.e(TAG, "aole_sdcard_forbid_on:" + aole_sdcard_forbid_on);
}
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "setPhoneList: " + e.getMessage()); Log.e(TAG, "setPhoneList: " + e.getMessage());
} }
} }
// TODO: 2023/1/13 目前有定义反的是投屏,蓝牙,热点
private void setBluetooth(SystemSettings settings) { private void setBluetooth(SystemSettings settings) {
try { try {
//蓝牙开关 //蓝牙开关
@@ -277,9 +287,13 @@ public class ControlManager {
//蓝牙音频开关 //蓝牙音频开关
int setting_bluetooth = changeNum(settings.getSetting_bluetooth()); int setting_bluetooth = changeNum(settings.getSetting_bluetooth());
//蓝牙传输开关 //蓝牙传输开关
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
setting_bht = changeNum(setting_bht);
}
boolean aole_bht_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_BHT_FORBID_ON, setting_bht); boolean aole_bht_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_BHT_FORBID_ON, setting_bht);
//写入系统数据库 //写入系统数据库
Log.e("SystemSetting", "aole_bht_forbid_on:" + aole_bht_forbid_on); Log.e("SystemSetting", "aole_bht_forbid_on:" + aole_bht_forbid_on);
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (aole_bht_forbid_on) { if (aole_bht_forbid_on) {
//成功 //成功
@@ -313,6 +327,9 @@ public class ControlManager {
private void setBluetooth(int state) { private void setBluetooth(int state) {
try { try {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
state = changeNum(state);
}
boolean aole_bht_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_BHT_FORBID_ON, state); boolean aole_bht_forbid_on = Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_BHT_FORBID_ON, state);
//写入系统数据库 //写入系统数据库
Log.e(TAG, "aole_bht_forbid_on:" + aole_bht_forbid_on); Log.e(TAG, "aole_bht_forbid_on:" + aole_bht_forbid_on);
@@ -337,6 +354,9 @@ public class ControlManager {
private void setHotspot(SystemSettings settings) { private void setHotspot(SystemSettings settings) {
try { try {
int setting_hotspot = changeNum(settings.getSetting_hotspot());//热点 int setting_hotspot = changeNum(settings.getSetting_hotspot());//热点
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
setting_hotspot = changeNum(setting_hotspot);
}
if (setting_hotspot == 1) { if (setting_hotspot == 1) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setAction("qch_hotspot_close"); intent.setAction("qch_hotspot_close");
@@ -352,6 +372,9 @@ public class ControlManager {
} }
private void setHotspot(int state) { private void setHotspot(int state) {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
state = changeNum(state);
}
try { try {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setAction("qch_hotspot_close"); intent.setAction("qch_hotspot_close");
@@ -669,6 +692,7 @@ public class ControlManager {
ToastUtil.debugShow("打开开发者模式"); ToastUtil.debugShow("打开开发者模式");
} }
} }
setUSBstate("usb_mtp");
closeSettingsApp(); closeSettingsApp();
} }
@@ -698,6 +722,7 @@ public class ControlManager {
ToastUtil.debugShow("打开开发者模式"); ToastUtil.debugShow("打开开发者模式");
} }
} }
setUSBstate("usb_mtp");
closeSettingsApp(); closeSettingsApp();
} }
@@ -802,6 +827,9 @@ public class ControlManager {
} }
public void setScreenShared(int state) { public void setScreenShared(int state) {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
state = changeNum(state);
}
Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SCREEN_SHARE, state); Settings.System.putInt(mResolver, CommonConfig.AOLE_ACTION_SCREEN_SHARE, state);
} }

View File

@@ -29,6 +29,7 @@ import com.fuying.sn.bean.Label;
import com.fuying.sn.bean.MyAppUsageBean; import com.fuying.sn.bean.MyAppUsageBean;
import com.fuying.sn.bean.OverallAppBean; import com.fuying.sn.bean.OverallAppBean;
import com.fuying.sn.bean.ScreenPassword; import com.fuying.sn.bean.ScreenPassword;
import com.fuying.sn.bean.SnBindState;
import com.fuying.sn.bean.SnInfo; import com.fuying.sn.bean.SnInfo;
import com.fuying.sn.bean.SystemSettingsSet; import com.fuying.sn.bean.SystemSettingsSet;
import com.fuying.sn.bean.UserAvatarInfo; import com.fuying.sn.bean.UserAvatarInfo;
@@ -73,6 +74,7 @@ import com.fuying.sn.network.api.SNInfoApi;
import com.fuying.sn.network.api.ScreenLock; import com.fuying.sn.network.api.ScreenLock;
import com.fuying.sn.network.api.ScreenState; import com.fuying.sn.network.api.ScreenState;
import com.fuying.sn.network.api.Setting; import com.fuying.sn.network.api.Setting;
import com.fuying.sn.network.api.SnBindApi;
import com.fuying.sn.network.api.TimeControl; import com.fuying.sn.network.api.TimeControl;
import com.fuying.sn.network.api.UpdateAdminSn; import com.fuying.sn.network.api.UpdateAdminSn;
import com.fuying.sn.network.api.UpdateLockScreen; import com.fuying.sn.network.api.UpdateLockScreen;
@@ -455,6 +457,13 @@ public class NetInterfaceManager {
.observeOn(AndroidSchedulers.mainThread()); .observeOn(AndroidSchedulers.mainThread());
} }
public Observable<BaseResponse<SnBindState>> getSnBindObservable() {
return mRetrofit.create(SnBindApi.class)
.getSnBind(Utils.getSerial())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
/* /*
* *
* execution * execution
@@ -2080,10 +2089,16 @@ public class NetInterfaceManager {
public void onNext(BaseResponse<SystemSettingsSet> systemSettingsBaseResponse) { public void onNext(BaseResponse<SystemSettingsSet> systemSettingsBaseResponse) {
Log.e("getSystemSettings", "onNext: " + systemSettingsBaseResponse); Log.e("getSystemSettings", "onNext: " + systemSettingsBaseResponse);
SPUtils.put(mContext, "is_first_connection", 0); SPUtils.put(mContext, "is_first_connection", 0);
//imei是否绑定
int is_bind = mMMKV.decodeInt(CommonConfig.DEVICES_IS_BIND_KEY, 0);
int code = systemSettingsBaseResponse.code; int code = systemSettingsBaseResponse.code;
if (code == 200) { if (is_bind == 1) {
String data = new Gson().toJson(systemSettingsBaseResponse.data.getUser()); if (code == 200) {
ControlManager.getInstance().setSystemSetting(data); String data = new Gson().toJson(systemSettingsBaseResponse.data.getUser());
ControlManager.getInstance().setSystemSetting(data);
} else {
ControlManager.getInstance().setDisableSetting();
}
} else { } else {
ControlManager.getInstance().setDisableSetting(); ControlManager.getInstance().setDisableSetting();
} }

View File

@@ -28,6 +28,8 @@ public class UrlAddress {
/*绑定设备消息*/ /*绑定设备消息*/
public final static String BIND_DEVICES = "sn/bindSn"; public final static String BIND_DEVICES = "sn/bindSn";
public final static String GET_SN_BIND = "sn/getSnBind";
/*获取批次*/ /*获取批次*/
public static final String GET_BATCH = "sn/getBatch"; public static final String GET_BATCH = "sn/getBatch";
/*设备信息接口*/ /*设备信息接口*/

View File

@@ -0,0 +1,16 @@
package com.fuying.sn.network.api;
import com.fuying.sn.bean.BaseResponse;
import com.fuying.sn.bean.SnBindState;
import com.fuying.sn.network.UrlAddress;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface SnBindApi {
@GET(UrlAddress.GET_SN_BIND)
Observable<BaseResponse<SnBindState>> getSnBind(
@Query("sn") String sn
);
}

View File

@@ -18,6 +18,7 @@ public class MainSContact {
void setLockScreenPwd(); void setLockScreenPwd();
void setAppInside(); void setAppInside();
void setForceInstall(); void setForceInstall();
void setSnBind();
void setSystemSettings(); void setSystemSettings();
void setBrowserLabel(); void setBrowserLabel();
void setBrowserWhiteList(); void setBrowserWhiteList();
@@ -56,6 +57,8 @@ public class MainSContact {
void getForceInstall(); void getForceInstall();
//获取id管控 //获取id管控
void getAppInside(); void getAppInside();
//获取设备绑定状态
void getSnBind();
//获取系统设置 //获取系统设置
void getSystemSettings(); void getSystemSettings();
//获取浏览器书签 //获取浏览器书签

View File

@@ -8,6 +8,7 @@ import android.util.Log;
import com.fuying.sn.bean.AppStart; import com.fuying.sn.bean.AppStart;
import com.fuying.sn.bean.BaseResponse; import com.fuying.sn.bean.BaseResponse;
import com.fuying.sn.bean.MyAppUsageBean; import com.fuying.sn.bean.MyAppUsageBean;
import com.fuying.sn.bean.SnBindState;
import com.fuying.sn.config.CommonConfig; import com.fuying.sn.config.CommonConfig;
import com.fuying.sn.desktop.RunningAppManager; import com.fuying.sn.desktop.RunningAppManager;
import com.fuying.sn.disklrucache.CacheHelper; import com.fuying.sn.disklrucache.CacheHelper;
@@ -26,6 +27,7 @@ import com.trello.rxlifecycle4.android.ActivityEvent;
import java.util.List; import java.util.List;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer; import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable; import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers; import io.reactivex.rxjava3.schedulers.Schedulers;
@@ -207,6 +209,42 @@ public class MainSPresenter implements MainSContact.Presenter {
}); });
} }
@Override
public void getSnBind() {
NetInterfaceManager.getInstance().getSnBindObservable()
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
.subscribe(new Observer<BaseResponse<SnBindState>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
Log.e("getSnBind", "onSubscribe: ");
}
@Override
public void onNext(@NonNull BaseResponse<SnBindState> snBindStateBaseResponse) {
Log.e("getSnBind", "onNext: " + snBindStateBaseResponse);
if (snBindStateBaseResponse.code == 200) {
SnBindState snBindState = snBindStateBaseResponse.data;
int is_bind = snBindState.getIs_bind();
mMMKV.encode(CommonConfig.DEVICES_IS_BIND_KEY, is_bind);
} else {
mMMKV.encode(CommonConfig.DEVICES_IS_BIND_KEY, 0);
}
}
@Override
public void onError(@NonNull Throwable e) {
Log.e("getSnBind", "onError: " + e.getMessage());
onComplete();
}
@Override
public void onComplete() {
Log.e("getSnBind", "onComplete: ");
mView.setSnBind();
}
});
}
@Override @Override
public void getSystemSettings() { public void getSystemSettings() {
NetInterfaceManager.getInstance() NetInterfaceManager.getInstance()

View File

@@ -122,7 +122,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
Handler.getMain().postDelayed(new Runnable() { Handler.getMain().postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
NetInterfaceManager.getInstance().updateAdminInfo(); // NetInterfaceManager.getInstance().updateAdminInfo();
if (JGYUtils.getInstance().isScreenOn()) { if (JGYUtils.getInstance().isScreenOn()) {
mPresenter.getSnInfo(); mPresenter.getSnInfo();
mPresenter.getAppAndWhite(); mPresenter.getAppAndWhite();
@@ -155,10 +155,17 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
mPresenter.setLifecycle(lifecycleSubject); mPresenter.setLifecycle(lifecycleSubject);
mPresenter.attachView(this); mPresenter.attachView(this);
// if (BuildConfig.DEBUG){
// Settings.Global.putInt(getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
// Settings.Global.putInt(getContentResolver(), Settings.Global.ADB_ENABLED, 1);
// Settings.System.putInt(getContentResolver(), CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 1);
// }
Log.e(TAG, "onCreate run: 20秒后请求网络"); Log.e(TAG, "onCreate run: 20秒后请求网络");
Handler.getMain().postDelayed(new Runnable() { Handler.getMain().postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
Log.e("TimeObserver", "run: "+NetStateUtils.isNetworkConnected(MainService.this) );
if (NetStateUtils.isNetworkConnected(MainService.this)) { if (NetStateUtils.isNetworkConnected(MainService.this)) {
NetInterfaceManager.getInstance().getAppWhiteList(() -> { NetInterfaceManager.getInstance().getAppWhiteList(() -> {
Log.e("TimeObserver", "onNext: getAppWhiteList"); Log.e("TimeObserver", "onNext: getAppWhiteList");
@@ -499,10 +506,12 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
} }
//设备没有绑定 //设备没有绑定
else if (code == 300) { else if (code == 300) {
NetInterfaceManager.getInstance().updateAdminInfo();
ControlManager.getInstance().setDisableSetting(); ControlManager.getInstance().setDisableSetting();
} }
//没有授权的设备 //没有授权的设备
else if (code == 401) { else if (code == 401) {
NetInterfaceManager.getInstance().updateAdminInfo();
ControlManager.getInstance().setDisableSetting(); ControlManager.getInstance().setDisableSetting();
} }
} }
@@ -543,6 +552,11 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
@Override @Override
public void setAppInside() { public void setAppInside() {
mPresenter.getSnBind();
}
@Override
public void setSnBind() {
mPresenter.getSystemSettings(); mPresenter.getSystemSettings();
} }

View File

@@ -916,6 +916,9 @@ public class MessageReceiver extends XGPushBaseReceiver {
} }
JsonObject extra = GsonUtils.getJsonObject(jsonString); JsonObject extra = GsonUtils.getJsonObject(jsonString);
int is_bluetooth = changeNum(extra.get("setting_bht").getAsInt()); int is_bluetooth = changeNum(extra.get("setting_bht").getAsInt());
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
is_bluetooth = changeNum(is_bluetooth);
}
Log.e(TAG, "aole_bht_forbid_on: " + is_bluetooth); Log.e(TAG, "aole_bht_forbid_on: " + is_bluetooth);
try { try {
//写入系统数据库 //写入系统数据库
@@ -1393,6 +1396,9 @@ public class MessageReceiver extends XGPushBaseReceiver {
private void setHotspot(Context context, String jsonString) { private void setHotspot(Context context, String jsonString) {
JsonObject jsonObject = GsonUtils.getJsonObject(jsonString); JsonObject jsonObject = GsonUtils.getJsonObject(jsonString);
int setting_hotspot = changeNum(jsonObject.get("setting_hotspot").getAsInt());//热点 int setting_hotspot = changeNum(jsonObject.get("setting_hotspot").getAsInt());//热点
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
setting_hotspot = changeNum(setting_hotspot);
}
try { try {
if (setting_hotspot == 1) { if (setting_hotspot == 1) {
Intent intent = new Intent(); Intent intent = new Intent();
@@ -1503,6 +1509,9 @@ public class MessageReceiver extends XGPushBaseReceiver {
private void setHotPoint(Context context, String jsonString) { private void setHotPoint(Context context, String jsonString) {
JsonObject jsonObject = GsonUtils.getJsonObject(jsonString); JsonObject jsonObject = GsonUtils.getJsonObject(jsonString);
int setting_hotspot = changeNum(jsonObject.get("hot_point").getAsInt());//热点 int setting_hotspot = changeNum(jsonObject.get("hot_point").getAsInt());//热点
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
setting_hotspot = changeNum(setting_hotspot);
}
try { try {
if (setting_hotspot == 1) { if (setting_hotspot == 1) {
Intent intent = new Intent(); Intent intent = new Intent();

View File

@@ -523,7 +523,8 @@ public class JGYUtils {
} }
public static String getCustomVersion() { public static String getCustomVersion() {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) { if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform
||JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
return getProperty("ro.build.display.id", "获取失败"); return getProperty("ro.build.display.id", "获取失败");
} else { } else {
return getProperty("ro.custom.build.version", "获取失败"); return getProperty("ro.custom.build.version", "获取失败");
@@ -531,7 +532,8 @@ public class JGYUtils {
} }
public static String getRomVersion() { public static String getRomVersion() {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) { if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform
||JGYUtils.getInstance().checkAppPlatform() == JGYUtils.M40sePlatform) {
return getProperty("ro.build.id", "获取失败"); return getProperty("ro.build.id", "获取失败");
} else { } else {
return getProperty("ro.build.display.id", "获取失败"); return getProperty("ro.build.display.id", "获取失败");