version:4.0
fix:修复日志上传错误 update:正在运行的app显示奥乐云系列应用
This commit is contained in:
@@ -263,30 +263,29 @@ public class LogcatService extends Service {
|
||||
}
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("sn", Utils.getSerial());
|
||||
MediaType mediaType = MediaType.Companion.parse("text/plain");
|
||||
MediaType mediaType = MediaType.Companion.parse("text/html");
|
||||
RequestBody fileBody = RequestBody.Companion.create(file, mediaType);
|
||||
//设置一个file文件
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), fileBody);
|
||||
|
||||
NetInterfaceManager.getInstance().getUploadLogApi()
|
||||
.GetSnRunLog(params, body)
|
||||
.UploadLog(params, body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseResponse<SnRunLog>>() {
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("uploadFile", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<SnRunLog> snRunLogBaseResponse) {
|
||||
public void onNext(BaseResponse snRunLogBaseResponse) {
|
||||
Log.e("uploadFile", "onNext: " + snRunLogBaseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("uploadFile", "onError: " + e.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.R;
|
||||
import com.aoleyun.sn.activity.checknet.CheckNetActivity;
|
||||
import com.aoleyun.sn.activity.main.MainAPresenter;
|
||||
import com.aoleyun.sn.activity.main.MainActivity;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.PoweroffBean;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
@@ -821,7 +822,10 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
} else {
|
||||
ToastUtil.betaShow("设备已解锁");
|
||||
SysSettingUtils.setEnableSetting(this);
|
||||
mPresenter.checkAoleyunUpdate();
|
||||
}
|
||||
Intent intent = new Intent(MainActivity.UPDATE_LOCKED_STATUS);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -829,6 +833,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
if (noTag) {
|
||||
//没有批次就没有管控
|
||||
Log.e(TAG, "setTagsFinish: " + "not set tag");
|
||||
mPresenter.getStudesInfo(true);
|
||||
} else {
|
||||
mPresenter.getDeviceBatch();
|
||||
}
|
||||
@@ -1011,8 +1016,5 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
SPUtils.put(this, "is_screen_lock", false);
|
||||
SPUtils.put(this, "screen_tips", "");
|
||||
}
|
||||
mPresenter.getWiFiPasswd();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user