Monday, June 6, 2016

Android N and Padlock

PadLock is meant to restrict access to applications that the user deems sensitive. And when there is only one application running on the screen at a time, this works reasonably well.

When there are two, a hole different problem emerges.

PadLock, by design, only launches a single Lock Screen which is the almighty in this context, and handles the restriction of all sensitive applications. Perhaps this is bad design, but nevertheless, this is how things work and the design is now stable and in production.

When two applications take the screen then, it is expected that PadLock will only be able to lock one of them, usually the first one. This effectively breaks PadLock, as it allows a user to avoid the restriction without knowing the passcode. That's not good.

A working patch on the dev branch seeks to fix this issue by allowing multiple instances of the LockScreenActivity to be launched. This allows PadLock to restrict multiple applications on the screen at the same time. Beautiful.

However, not all is easy. Normally, allowing multiple LockScreenActivity instances would create duplicates in the Recent Activity stack. I have changed the way that the LockScreenActivity cleans up after itself, which should hopefully avoid this issue.

I will be pushing the patch forward far before the release of Android N. Do note then, that the oldest version of PadLock that will "work" on Android N is the to-be-release 1.4.0. If you are running on an older version of PadLock at the time you upgrade to Android N, you will enter multi-window hell.

Also note that if you do not use an ignore-time for PadLock, that by design, when switching focus between multi-window apps, PadLock will re-lock the application. This can be very frequent (and also very annoying). This is by design - since as the user you have requested there be no buffer time where a passcode is not asked. If you would wish to avoid this scenario, configure PadLock to use a non-zero ignore time value, like 5 minutes or - in the future - a user configured value.

Android N is the future. And the future is looking very cool. Hopefully PadLock, and all of the other pyamsoft applications, can be similarly chilly.

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my FaceBook Page
Follow my Google+ Page
=========================