+8
−5
+3
−1
+15
−2
+2
−2
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This CL allows restart_period to be set to a value shorter than 5s. Previously this was prohibited to rate limit crashing services. That behavior is considered to be a bit too conservative because some services don't crash, but exit deliverately. adbd is the motivating example. When adb root or adb unroot is requested, it changes its mode of operation (via sysprop), exits itself, and restarts (by init) to enter into the mode. However, due to the 5s delay, the mode change can complete no earlier than 5 seconds after adbd was started last time. This can slow the mode change when it is requested right after the boot. With this CL, restart_period can be set to a value smaller than 5. And services like adbd can make use of it. However, in ordef to rate limit crashing service, the default is enforced if the service was crashed last time. In addition, such intended restart is not counted as crashes when monitoring successive crashes during booting. Bug: 286061817 Bug: 339844204 Test: /packages/modules/Virtualization/vm/vm_shell.sh start-microdroid \ --auto-connect -- --protected * with this change: within 2s * without this change: over 6s (cherry picked from https://android-review.googlesource.com/q/commit:0d277d777f290729fd9708b88f7ed57f0e0e49eb) Merged-In: I1b3f0c92d349e8c8760821cf50fb69997b67b242 Change-Id: I1b3f0c92d349e8c8760821cf50fb69997b67b242