version:4.3

fix:安装应用时不清除桌面缓存,锁定状态改变时不恢复出厂设置
update:在获取sn没有刷写的状态时,获取IMEI作为别名
This commit is contained in:
2022-04-19 09:24:45 +08:00
parent 2339e1484d
commit 69a8934bd4
24 changed files with 514 additions and 263 deletions

View File

@@ -252,7 +252,7 @@ public class GuardService extends Service {
long time = System.currentTimeMillis();
getLockState("1", String.valueOf(time));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
JGYUtils.getInstance().wakeUpAppstore();
JGYUtils.getInstance().wakeUpAoleyunAPP();
JGYUtils.getInstance().deleteScreenshots();
}
sendScreenStatus(2);
@@ -310,7 +310,7 @@ public class GuardService extends Service {
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
.build();
SendScreenStatusApi sendScreenStatusApi = retrofit.create(SendScreenStatusApi.class);
sendScreenStatusApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(), status)
sendScreenStatusApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), status)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseResponse>() {
@@ -347,7 +347,7 @@ public class GuardService extends Service {
}
NetInterfaceManager.getInstance()
.getLockState()
.getLockState(Utils.getSerial(), status, time)
.getLockState(Utils.getSerial(this), status, time)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<ResponseBody>() {
@@ -494,7 +494,7 @@ public class GuardService extends Service {
}
NetInterfaceManager.getInstance()
.getSendTimesApi()
.sendDownloadTimes(NetInterfaceManager.HTTP_KEY, Utils.getSerial(), app_package, app_id)
.sendDownloadTimes(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), app_package, app_id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseResponse>() {

View File

@@ -219,9 +219,9 @@ public class LogcatService extends Service {
}
if (clear_file) {
logFileName = Utils.getSerial() + ".log";
logFileName = Utils.getSerial(this) + ".log";
} else {
logFileName = Utils.getSerial() + "-" + getTime() + ".log";
logFileName = Utils.getSerial(this) + "-" + getTime() + ".log";
}
try {
@@ -262,7 +262,7 @@ public class LogcatService extends Service {
return;
}
Map<String, String> params = new HashMap<>();
params.put("sn", Utils.getSerial());
params.put("sn", Utils.getSerial(this));
MediaType mediaType = MediaType.Companion.parse("text/html");
RequestBody fileBody = RequestBody.Companion.create(file, mediaType);
//设置一个file文件

View File

@@ -227,7 +227,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
*/
public void sendMsg() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("sn", Utils.getSerial());
jsonObject.put("sn", Utils.getSerial(this));
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (!pm.isScreenOn()) {
jsonObject.put("online", 2);
@@ -243,7 +243,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
public void sendMsg(int state) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("sn", Utils.getSerial());
jsonObject.put("sn", Utils.getSerial(this));
jsonObject.put("online", state);
try {
if (null != client) {

View File

@@ -72,7 +72,7 @@ public class MainSPresenter implements MainSContact.Presenter {
this.requesting = requesting;
}
public long responseTime;
public long responseTime;
/**
* 1
@@ -169,7 +169,7 @@ public class MainSPresenter implements MainSContact.Presenter {
if (JGYUtils.isOfficialVersion()) {
mView.updateDeviceInfoFinish();
}
NetInterfaceManager.getInstance().updateDeviceInfo(new NetInterfaceManager.onCompleteCallback() {
NetInterfaceManager.getInstance().updateDeviceInfo(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
@Override
public void onComplete() {
mView.updateDeviceInfoFinish();

View File

@@ -158,7 +158,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
//token在设备卸载重装的时候有可能会变
Log.e("TPush", "注册成功设备token为" + data);
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial(MainService.this)));
XGPushManager.upsertAccounts(MainService.this, accountInfoList, new XGIOperateCallback() {
@Override
public void onSuccess(Object data, int flag) {
@@ -402,7 +402,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.e(TAG, "onStartCommand: ");
JGYUtils.getInstance().wakeUpAppstore();
JGYUtils.getInstance().wakeUpAoleyunAPP();
if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 1) == 0) {
if (!checkAoleyunApp()) {
Log.e(TAG, "onStartCommand: " + "checkAoleyunApp");