GET_TASKS权限德precated权限、GET_TASKS、precated

2023-09-07 14:02:01 作者:这个夏天,自己一个人丶

我有一个使用该权限的安全应用程序(App储物柜):

I have an security App (App Locker) that uses this permission:

android.permission.GET_TASKS

在Android的棒棒糖此权限去precated,我想我的应用程序的API +21工作。结果任何人都可以指导我如何?

In android Lollipop this permission is deprecated and i want that my app works in +21 API. Can anyone guide me how?

日Thnx:)

推荐答案

有就是它之所以pcated德$ P $。android.permission.GET_TASKS的保护级别已经提升到signatureOrSystem。没有为该没有简单和无害溶液

There is reason why it is deprecated. The protection Level of android.permission.GET_TASKS has been elevated to signatureOrSystem. There is no easy and unharmful solution for that.

棒棒糖,这种方法已不再适用于第三方应用程序:实行以文档为中心的最近通话意味着它可以泄露个人信息给调用者。对于后向兼容性,它仍然会返回其数据的一小部分:至少呼叫者的自己的任务(虽然看到检索信息的正确支承方式getAppTasks()),和可能的一些其它的任务,如家已知会不敏感的。

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.

http://developer.android.com/reference/android/app/ActivityManager.html#getRecentTasks(int,%20int)