Android 2.2 depreciates restartPackage but adds another headache

Android 2.2 release notes have just been released. The ActivityManager.restartPackage method is deprecated, and the description:

the previous behavior here is no longer available for applications, since it allows them to disrupt other applications, removing their alarms, stopping their services, etc.

Instead, 2.2 provided another tool for the ugly "task killer" applications, introducing the new ActivityManager.killBackgroundProcesses method.

Additional Information

Can someone explain if ActivityManager.killBackgroundProcesses will kill our scheduled alarms?

If so, abandoning ActivityManager.restartPackage was pointless because the task killer would now abuse ActivityManager.killBackgroundProcesses.

+3
source share
2 answers

I ran tests with this new kill method: anxieties are not killed. services are restarted.

+2
source

From my testing, it is also clear that user-visible actions do not close when this method is called.

+1
source

Source: https://habr.com/ru/post/1746454/


All Articles