Skip to content

Commit 23592d1

Browse files
committed
Improve the stability of idleApps
1 parent e6e3dd5 commit 23592d1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

install/accd.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,6 @@ if ! $init; then
240240
{ $restrictCurr && [[ .${cooldownCurrent-} = .*% ]]; } || set_temp_level
241241
shutdownWarnings=true
242242

243-
set +u
244-
if [ -n "${idleApps[0]}" ]; then
245-
dumpsys activity top | sed -En 's/(.*ACTIVITY )(.*)(\/.*)/\2/p' \
246-
| tail -n 1 | grep -E "$(echo ${idleApps[*]} | sed 's/ /|/g; s/,/|/g')" >/dev/null \
247-
&& capacity[3]=$(cat $battCapacity) && capacity[2]=$((capacity[3] - 5)) || :
248-
fi
249-
set -u
250-
251243
else
252244

253245
$rebootResume \
@@ -279,6 +271,14 @@ if ! $init; then
279271

280272
sync_capacity
281273

274+
set +u
275+
if [ -n "${idleApps[0]}" ]; then
276+
dumpsys activity top | sed -En 's/(.*ACTIVITY )(.*)(\/.*)/\2/p' \
277+
| tail -n 1 | grep -E "$(echo ${idleApps[*]} | sed 's/ /|/g; s/,/|/g')" >/dev/null \
278+
&& capacity[3]=$(cat $battCapacity) && capacity[2]=$((capacity[3] - 5)) || :
279+
fi
280+
set -u
281+
282282
# log buffer reset
283283
[ $(du -k $log | cut -f 1) -lt 256 ] || : > $log
284284

module.prop

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
id=acc
22
domain=vr25
33
name=Advanced Charging Controller (ACC)
4-
version=v2024.2.11-rc
5-
versionCode=202402110
4+
version=v2024.2.11.1-rc
5+
versionCode=202402111
66
author=VR25
77
description=Extend your battery's service life by controlling charging current, temperature, and voltage. Any root solution is supported. The installation is always "systemless". Works on Android and KaiOS.
88
updateJson=https://raw.githubusercontent.com/VR-25/acc/master/module.json

0 commit comments

Comments
 (0)