version:3.0.9
fix: update:修复为自定义时管控失效
This commit is contained in:
@@ -73,8 +73,8 @@ android {
|
||||
|
||||
official {
|
||||
flavorDimensions "default"
|
||||
versionCode 48
|
||||
versionName "3.0.8"
|
||||
versionCode 49
|
||||
versionName "3.0.9"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -741,31 +741,22 @@ public class RunningAppManager {
|
||||
Log.e(TAG, "inControlTime: " + "应用始终可用");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
|
||||
if (globalRemainingTime <= 0) {
|
||||
if (machineControl != null) {
|
||||
if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show("今日可使用时间已用完");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (havaConfigure) {
|
||||
//有单独设置 不管是分类整机还是其他都是这个设置
|
||||
AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
|
||||
// if (appTimeControl.getIs_control() == 0) {
|
||||
// ToastUtil.show("应用已被禁用");
|
||||
// Log.e(TAG, "inControlTime: " + "应用已被禁用");
|
||||
// return true;
|
||||
// }
|
||||
// if (appTimeControl.getTc_use_type() == 0) {
|
||||
// Log.e(TAG, "inControlTime: " + "应用始终可用");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
|
||||
if (appTimeControl.getTc_use_type() != 3) {
|
||||
if (globalRemainingTime <= 0) {
|
||||
if (machineControl != null) {
|
||||
if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
|
||||
Log.e(TAG, "inControlTime: is_part = 0 is_quota = 0");
|
||||
//整机额度和时间段关闭不管控
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show("今日可使用时间已用完");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//打开时间段管控
|
||||
if (appTimeControl.getIs_part() == 1) {
|
||||
boolean inControlTime = inControlTime(machineControl, appTimeControl);
|
||||
@@ -791,6 +782,7 @@ public class RunningAppManager {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//关闭时间段管控关闭额度开关为不管控
|
||||
if (appTimeControl.getIs_quota() == 0) {
|
||||
Log.e(TAG, "inControlTime: " + "没有使用额度");
|
||||
return false;
|
||||
@@ -809,6 +801,14 @@ public class RunningAppManager {
|
||||
if (machineControl == null) {
|
||||
return false;
|
||||
}
|
||||
if (globalRemainingTime <= 0) {
|
||||
if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
|
||||
Log.e(TAG, "inControlTime: is_part = 0 is_quota = 0");
|
||||
//整机额度和时间段关闭不管控
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (machineControl.is_quota == 1) {
|
||||
if (haveUseTime(machineControl.getWork_time(), machineControl.getRest_time(), machineControl.getToday_time())) {
|
||||
return false;
|
||||
@@ -904,15 +904,16 @@ public class RunningAppManager {
|
||||
MachineControl machineControl = TimeControlManager.getInstance().getGlobalMachineControl();
|
||||
|
||||
Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
|
||||
if (globalRemainingTime <= 0) {
|
||||
if (machineControl != null) {
|
||||
if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
// if (globalRemainingTime <= 0) {
|
||||
// if (machineControl != null) {
|
||||
// if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
|
||||
// return "";
|
||||
// }
|
||||
// } else {
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
|
||||
if (havaConfigure) {
|
||||
//有单独设置 不管是分类整机还是其他都是这个设置
|
||||
AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
|
||||
|
||||
@@ -76,6 +76,7 @@ public class TimeControlManager {
|
||||
return false;
|
||||
} else {
|
||||
if (appTimeControl.getTc_use_type() == 1) {
|
||||
//根据分类
|
||||
Log.e(TAG, "havaConfigure: classify");
|
||||
return mClassifyTimeControlHashMap.get(appTimeControl.getTc_class_id()) != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user