GET_TASKS 权限已弃用 [英] GET_TASKS Permission Deprecated

查看:13
本文介绍了GET_TASKS 权限已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用此权限的安全应用 (App Locker):

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

android.permission.GET_TASKS

在 android Lollipop 中,此权限已被弃用,我希望我的应用程序在 +21 API 中运行.
谁能指导我怎么做?

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

谢谢:)

推荐答案

它被弃用是有原因的.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.

从 LOLLIPOP 开始,此方法不再适用于第三方应用程序:引入以文档为中心的最近记录意味着它可能会将个人信息泄露给调用者.为了向后兼容,它仍将返回其数据的一小部分:至少是调用者自己的任务(尽管请参阅 getAppTasks() 以获取检索该信息的正确支持方式),并且可能还有一些其他任务,例如已知的 home不要敏感.

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)

这篇关于GET_TASKS 权限已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆