优化白名单
1.3
This commit is contained in:
@@ -707,6 +707,7 @@ public class RunningAppManager {
|
||||
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) {
|
||||
@@ -719,6 +720,8 @@ public class RunningAppManager {
|
||||
if (inControlTime) {
|
||||
Log.i(TAG, "inControlTime: " + "应用在管控时间段不能打开" + appTimeControl.time_part.toString());
|
||||
ToastUtil.show("该应用" + partTime2String(appTimeControl));
|
||||
Log.e(TAG, "inControlTime: " + "该应用" + partTime2String(appTimeControl));
|
||||
|
||||
return true;
|
||||
} else {
|
||||
if (appTimeControl.getIs_quota() == 0) {
|
||||
@@ -728,6 +731,8 @@ public class RunningAppManager {
|
||||
if (getAppRemainingTime(pkg) <= 0) {
|
||||
//没有剩余时间
|
||||
ToastUtil.show("该应用今日可使用时间已用完");
|
||||
Log.e(TAG, "inControlTime: " + "该应用今日可使用时间已用完");
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -735,12 +740,14 @@ public class RunningAppManager {
|
||||
}
|
||||
} else {
|
||||
if (appTimeControl.getIs_quota() == 0) {
|
||||
// ToastUtil.show("没有使用额度");
|
||||
ToastUtil.show("没有使用额度");
|
||||
Log.e(TAG, "inControlTime: " + "没有使用额度");
|
||||
return false;
|
||||
}
|
||||
if (getAppRemainingTime(pkg) <= 0) {
|
||||
//没有剩余时间
|
||||
ToastUtil.show("该应用今日可使用时间已用完");
|
||||
Log.e(TAG, "inControlTime: " + "该应用今日可使用时间已用完");
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user