What functions or codes require GET_TASKS permission in Android?

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.