Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is android:excludeFromRecents broken for the first app that is launched on the device on Android L?

Tags:

android

Is seems like the current way to exclude apps from the recent apps-lists in android L is broken. Our app is using android:excludeFromRecents and it works just fine. Unless our app is the FIRST app to start when the device reboots.

This is how it looks when our app is exited as the first app on the device: InBrowser, with android:excludeFromRecents, started as the first app on device

And here is how it looks if we first start the camera (or any other app), then our app and exit both: Camera is started first, then InBrowser. Working as expected.

Simply put: If an app with android:excludeFromRecents is started as the first app on the device, the directive android:excludeFromRecents isn't working. If another app has been started before the android:excludeFromRecents-app, it works as expected.

Is this a really weird edge-case bug or am i'm missing something very obvious here?

We build a very privacy cautious web browser (http://inbrowserapp.com), so we cannot have any screenshots from the app showing once the app is closed. But this should also affect banking-apps, password-managers etc since sensitive information will be screenshotted if the app is the first to start after a reboot.

Maybe we can go about the route and hide the sensitive information with a blank view when the user is exiting on Android L. But its seems like something is buggy here?

like image 259
Tommie Avatar asked Sep 30 '22 00:09

Tommie


1 Answers

I'm happy to say that this is fixed for Android 5.1. Just confirmed it on a device running 5.1.

So the correct solution, for us anyways, is to deny screenshots with getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); for Lollipop with SDK version 21, anything below or above that should be fine.

like image 80
Tommie Avatar answered Oct 08 '22 01:10

Tommie