version:3.4.5
fix: update:优化全局网络黑名单和第二天提示整机时间已用完
This commit is contained in:
1 parent
6f605bb263
commit
42a38cc6d9
9 files changed
+170
-53
No files matched your search
@@ -71,7 +71,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getAppAndWhite() {
|
||||
NetInterfaceManager.getInstance().getAppAndWhite(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
NetInterfaceManager.getInstance().getAppAndWhite(getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAppAndWhiteFinish();
|
||||
@@ -249,7 +249,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
@Override
|
||||
public void getSystemSettings() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getSystemSettings(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
.getSystemSettings(getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setSystemSettings();
|
||||
@@ -319,7 +319,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getAppTimeControl() {
|
||||
NetInterfaceManager.getInstance().getAppTimeControl(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
NetInterfaceManager.getInstance().getAppTimeControl(getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setAppTimeControl();
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.fuying.sn.config.CommonConfig;
|
||||
import com.fuying.sn.manager.AmapManager;
|
||||
import com.fuying.sn.manager.ControlManager;
|
||||
import com.fuying.sn.network.NetInterfaceManager;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
import com.fuying.sn.rlog.LogDBManager;
|
||||
import com.fuying.sn.service.DownloadService;
|
||||
import com.fuying.sn.service.GuardService;
|
||||
@@ -201,6 +202,8 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
|
||||
registerReceivers();
|
||||
startService();
|
||||
Settings.System.putString(getContentResolver(), CommonConfig.APP_SOURCE_WHITE_LIST, DEFAULT_SOURCE);
|
||||
|
||||
JGYUtils.getInstance().putBuiltInApps();
|
||||
}
|
||||
|
||||
private static final String DEFAULT_SOURCE = "com.fuying.sn,com.fuying.appstore,com.fuying.fuxiaoying";
|
||||
@@ -466,7 +469,7 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
|
||||
// mPresenter.getAppTimeControl();
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_ON:
|
||||
|
||||
getAppControl();
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_OFF:
|
||||
|
||||
@@ -480,6 +483,19 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
|
||||
}
|
||||
}
|
||||
|
||||
private void getAppControl() {
|
||||
Log.e(TAG, "getAppControl: ");
|
||||
long lastTime = mMMKV.decodeLong(UrlAddress.GET_APP_TIME_CONTROL + "_time", System.currentTimeMillis());
|
||||
Log.e(TAG, "getAppControl: lastTime = " + lastTime);
|
||||
Log.e(TAG, "getAppControl: lastTime = " + TimeUtils.getDate(lastTime));
|
||||
if (TimeUtils.isTodayWithJavaTime(lastTime)) {
|
||||
Log.e(TAG, "getAppControl: requests have been made today");
|
||||
} else {
|
||||
Log.e(TAG, "getAppControl: getAppTimeControl");
|
||||
mPresenter.getAppTimeControl();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppAndWhiteFinish() {
|
||||
mPresenter.checkUpdate();
|
||||
|
||||
Reference in new issue
Block a user