优化RemindThread线程,节约电量。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sat Dec 20 13:21:44 GMT 2025
|
||||
#Sat Dec 20 14:53:00 GMT 2025
|
||||
stageCount=12
|
||||
libraryProject=
|
||||
baseVersion=15.14
|
||||
publishVersion=15.14.11
|
||||
buildCount=14
|
||||
buildCount=16
|
||||
baseBetaVersion=15.14.12
|
||||
|
||||
@@ -222,10 +222,14 @@ public class RemindThread extends Thread {
|
||||
} else if (!isCharging && isEnableUsageReminder && quantityOfElectricity <= usageReminderValue) {
|
||||
LogUtils.d(TAG, "触发耗电提醒 | 当前电量=" + quantityOfElectricity + " ≤ 阈值=" + usageReminderValue + " | threadId=" + getId());
|
||||
sendNotificationMessageInternal(REMIND_TYPE_USAGE, quantityOfElectricity, isCharging);
|
||||
}
|
||||
|
||||
// 安全休眠,保留中断标记
|
||||
} else {
|
||||
// 未有合适类型提醒,退出提醒线程
|
||||
LogUtils.d(TAG, "未有合适类型提醒,退出提醒线程");
|
||||
break;
|
||||
}
|
||||
// 安全休眠,保留中断标记
|
||||
safeSleepInternal(sleepTime);
|
||||
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, "循环运行异常,退出电量提醒线程 | 当前电量=" + quantityOfElectricity + " | threadId=" + getId(), e);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user