我们应该在单独的线程中调用PowerManger的重启方法吗?

时间:2018-04-05 15:33:34

标签: java android powermanager android-powermanager

我需要以编程方式重新启动Android设备,并且PowerManager的D功能派上用场。

我的问题是:
应该在一个单独的线程中调用C还是可以在同一个线程中调用它?

1 个答案:

答案 0 :(得分:0)

虽然我不是Android开发人员,但这就是我找到的。

tl; dr:我还没有看到在其自己的线程中调用reboot的示例;你呢?

Here's the official reboot docs enter image description here

Here's a SO answer on using reboot, no mention of calling it in a separate thread

Here's a 'crowd-sourced cookbook' article about using reboot; nomention of calling it in a separate thread

猜测API会自动为您优雅地处理它。

相关问题