version:1.5

fix:
add:非法设备不进行自动下载
This commit is contained in:
2022-01-25 16:17:28 +08:00
parent f0307e9027
commit be3934c1bb
11 changed files with 96 additions and 42 deletions

View File

@@ -283,7 +283,6 @@ public class MainService extends Service implements MainContact.MainView, Networ
UserInfo userInfo = response.data;
boolean username = Settings.System.putString(getContentResolver(), "UserInfo_username", userInfo.getSn_name());
boolean gread = Settings.System.putString(getContentResolver(), "UserInfo_grade", userInfo.getGrade());
SPUtils.put(this, Configs.isLogined, 1);
SPUtils.put(this, "member_id", userInfo.getMember_id());
SPUtils.put(this, "sn_id", userInfo.getId());
if (!TextUtils.isEmpty(userInfo.getSn_name())) {

View File

@@ -25,11 +25,13 @@ import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.NetworkUtils;
import com.uiui.sn.R;
import com.uiui.sn.bean.zuoye.BaseResponse;
import com.uiui.sn.config.Configs;
import com.uiui.sn.manager.ControlManager;
import com.uiui.sn.manager.NetInterfaceManager;
import com.uiui.sn.network.HTTPInterface;
import com.uiui.sn.receiver.APKinstallReceiver;
import com.uiui.sn.receiver.BootReceiver;
import com.uiui.sn.utils.JGYUtils;
import com.uiui.sn.utils.SPUtils;
import com.uiui.sn.utils.TimeUtils;
import com.uiui.sn.utils.Utils;
@@ -97,11 +99,13 @@ public class ManagerService extends Service implements NetworkUtils.OnNetworkSta
@Override
public void onNext(Long aLong) {
Log.e("TimeObserver", "onNext: " + aLong);
int isLogined = (int) SPUtils.get(ManagerService.this, Configs.isLogined, 2);
if (isLogined == 2) return;
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this), 1234);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, "com.uiui.appstore"), 2345);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, "com.uiui.browser"), 3456);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, "com.uiui.os"), 5678);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, "com.uiui.videoplayer"), 6789);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, JGYUtils.PACKAGE_APPSTORE), 2345);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, JGYUtils.PACKAGE_BROWSER), 3456);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, JGYUtils.PACKAGE_OS), 5678);
Handler.getMain().postDelayed(() -> HTTPInterface.checkUpdate(ManagerService.this, JGYUtils.PACKAGE_VIDEOPLAYER), 6789);
}