A list of Android APIs that require certain Android permissions

android, permissions

Solution

Both of these permissions are quite specialized, and only have a few uses.

android.permission.REBOOT

First of all, this permission has a protection level of `signatureOrSystem`, so unless your application is part of a custom ROM or you have access to the signing keys for the platform you are installing it on, the application won't even be granted the permission.]

It is required to call `PowerManager.reboot()`

android.permission.GET_TASKS

This permission is only marked `dangerous`, so your app can actually obtain this one.

There are two calls in `ActivityManager` that require this permission, `getRecentTasks()` and `getRunningTasks()` to get information about the current application tasks in the system. It's often used by custom Launcher applications to populate task lists.

HTH

Problem

Is there a way to tell if a certain Android permission is required by which Android APIs? For example, which APIs will require the GET_TASKS or REBOOT permissions? My app, inherited from someone who's long gone, has these permissions listed in the manifest. I don't think we are using them, but I'm also afraid that if I remove them, there will be bad consequences. Any ideas on how to deal with this?

Original source