Yossi Vainshtein
Yossi Vainshtein

Reputation: 4005

Exiting lockTaskMode in android shows lock screen

In my android app, the user should be restricted from navigating away from an activity while a certain process happens on the backend. For this, I use startLockTask() in the activity when the process starts, and when the process ends I call stopLockTask().

Currently the app runs on a device where there's no device owner set, so screen pinning is activated, not lock task mode.

It seems that if a lock screen is configured on the device, upon calling stopLockTask the device always shows the lock screen. Why is that? can't I just unpin? Is this the normal behaviour? Can I disable that?

I tried with a sample app which just starts/stops lock task mode with button presses and it seems the behaviour is the same.

Upvotes: 2

Views: 1742

Answers (1)

Yossi Vainshtein
Yossi Vainshtein

Reputation: 4005

Hope this helps anyone -

Turns out that this is a behaviour that can be controlled via settings, it's actually a feature. On my Samsung device:

Settings -> Security -> Other security settings -> Pin windows -> disable “Ask for pattern before unpinning”

Upvotes: 3

Related Questions