gpt4 book ai didi

android - GET_TASKS 权限已弃用

转载 作者:IT王子 更新时间:2023-10-29 00:02:15 24 4
gpt4 key购买 nike

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

android.permission.GET_TASKS

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

谢谢:)

最佳答案

它被弃用是有原因的。android.permission.GET_TASKS 的保护级别已提升到 signatureOrSystem。对此没有简单且无害的解决方案。

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)

关于android - GET_TASKS 权限已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27974583/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com