fix:
update:优化获取数据
This commit is contained in:
2022-09-01 20:31:45 +08:00
parent 26075a1486
commit 5875eff3c6
3 changed files with 12 additions and 4 deletions

View File

@@ -56,6 +56,7 @@ import com.aoleyun.sn.utils.SysSettingUtils;
import com.aoleyun.sn.utils.TimeUtils;
import com.aoleyun.sn.utils.ToastUtil;
import com.aoleyun.sn.utils.Utils;
import com.arialyy.aria.core.Aria;
import com.blankj.utilcode.util.NetworkUtils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
@@ -103,6 +104,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
public void onConnected(NetworkUtils.NetworkType networkType) {
// Debug.waitForDebugger();
ToastUtil.betaShow("网络已连接");
Aria.download(this).resumeAllTask();
String WiFiAlias = Utils.getWifiAlias(this);
Log.e("OnNetworkStatusChanged", "onConnected: " + WiFiAlias);
Utils.getPublicIP(this);
@@ -383,6 +385,8 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
Log.e(TAG, "onReceive: " + e.getMessage());
e.printStackTrace();
}
mPresenter.getLockedState("upgrade");
mPresenter.checkAoleyunUpdate();
} else {
if (ConnectManager.getInstance().isRebootFistConnect()) {
start.onstar(ConnectManager.REBOOT_LAST_ONNECT_TIME);

View File

@@ -101,6 +101,7 @@ public class CacheUtils {
public boolean retValue = false;
private boolean doneFlag = false;
@Override
public void onRemoveCompleted(String packageName, boolean succeeded) throws RemoteException {
synchronized (this) {
retValue = succeeded;
@@ -119,6 +120,7 @@ public class CacheUtils {
public PackageStats stats;
private boolean doneFlag = false;
@Override
public void onGetStatsCompleted(PackageStats pStats, boolean succeeded) throws RemoteException {
synchronized (this) {
retValue = succeeded;