gpt4 book ai didi

android - 是安卓:excludeFromRecents broken for the first app that is launched on the device on Android L?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:44:24 25 4
gpt4 key购买 nike

似乎当前从 android L 中最近的应用程序列表中排除应用程序的方法已损坏。我们的应用程序使用的是 android:excludeFromRecents 并且运行良好。除非我们的应用是设备重启时第一个启动的应用。

这是当我们的应用程序作为设备上的第一个应用程序退出时的样子: InBrowser, with android:excludeFromRecents, started as the first app on device

下面是我们首先启动相机(或任何其他应用程序),然后我们的应用程序并退出两者的情况: Camera is started first, then InBrowser. Working as expected.

简单地说:如果带有 android:excludeFromRecents 的应用程序作为设备上的第一个应用程序启动,则指令 android:excludeFromRecents 不起作用。如果在 android:excludeFromRecents-app 之前启动了另一个应用程序,它会按预期工作。

这是一个非常奇怪的边缘案例错误,还是我在这里遗漏了一些非常明显的东西?

我们构建了一个非常注重隐私的网络浏览器 ( http://inbrowserapp.com ),因此一旦应用程序关闭,我们就无法显示应用程序的任何屏幕截图。但这也会影响银行应用程序、密码管理器等,因为如果应用程序在重启后第一个启动,敏感信息将被截屏。

当用户在 Android L 上退出时,也许我们可以绕过路线并使用空白 View 隐藏敏感信息。但这里似乎有问题?

最佳答案

我很高兴地说这已针对 Android 5.1 修复。刚刚在运行 5.1 的设备上确认了这一点。

因此,无论如何,对我们来说,正确的解决方案是使用 getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE) 拒绝屏幕截图;对于 SDK 版本 21 的 Lollipop,任何低于或高于该版本的都应该没问题。

关于android - 是安卓:excludeFromRecents broken for the first app that is launched on the device on Android L?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27927197/

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