I think the GET_TASKS permission is an orphan line in my AndroidManifest.xml. I want to remove it safely. Do you know any function or code that requires this permission? Thank you.
<uses-permission android:name="android.permission.GET_TASKS" />
GET_TASKS. Allows the app to retrieve information about currently and recently running tasks. This may allow the app to discover information about which applications are used on the device.
<permission> description: Declares a security permission that can be used to limit access to specific components or features of this or other applications.
If your app needs to access the user's location, you must request permission by adding the relevant Android location permissions to your app. Android offers two location permissions: ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION . The permission you choose determines the accuracy of the location returned by the API.
Also, there are various protection levels in permission i.e. if the protection level of permission is very low then you need not ask the user to use that permission. You can directly use that. But for dangerous permissions, you need to explicitly take permission from the user.
From the android reference
Allows an application to get information about the currently or recently running tasks.
An example is public List<ActivityManager.RecentTaskInfo> getRecentTasks (int maxNum, int flags)
as it throws SecurityException if the caller does not hold the GET_TASKS permission.
Note that according to the documentation
This constant was deprecated in API level 21. No longer enforced.
and
As of LOLLIPOP, this method is no longer available to third party applications: the introduction of document-centric recents means it can leak personal information to the caller. For backwards compatibility, it will still return a small subset of its data: at least the caller's own tasks (though see getAppTasks() for the correct supported way to retrieve that information), and possibly some other tasks such as home that are known to not be sensitive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With