Commit c448b21
committed
fix(power): reschedule idle tasks
1. Query the current idle state from IdleWatcher when updating the power save plan.
2. Recalculate task delays differently when the session is already idle.
3. Drop the duplicated PowerSavePlan idle state to avoid stale scheduling decisions.
Log: Reschedule power save tasks correctly when the idle state is already active.
fix(power): 修复 idle 任务重排
1. 更新节能计划时从 IdleWatcher 查询当前 idle 状态。
2. 会话已处于 idle 状态时按任务自身延迟重新计算定时任务。
3. 移除 PowerSavePlan 重复维护的 idle 状态,避免使用过期状态调度任务。
Log: 已处于 idle 状态时正确重排节能任务。1 parent b1b7819 commit c448b21
2 files changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | | - | |
131 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
132 | 141 | | |
133 | | - | |
134 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
135 | 145 | | |
136 | 146 | | |
137 | 147 | | |
| |||
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
152 | | - | |
153 | | - | |
154 | 162 | | |
155 | 163 | | |
156 | 164 | | |
| |||
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
165 | | - | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
| |||
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | | - | |
| 184 | + | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
0 commit comments