Does the Android OS release a wakelock if the app or service holding it is killed?

前端 未结 2 1599
傲寒
傲寒 2020-12-23 12:46

I have question about wakelock. In cases shown below, does android OS release wakelock (PARTIAL_WAKE_LOCK if you need to specify) to prevent wakelock was left a

2条回答
  •  醉酒成梦
    2020-12-23 13:25

    I would assume (I don't know this for certain) the Android system does not keep wakelocks for killed processes. Most likely when it kills a process with sigkill it also removes any wakelocks held by that process.

    Otherwise, as you say, crashes would lead to the phone always being awake, which I have not observed.

提交回复
热议问题