Keyguard not honouring settings in Lock Task Mode

Hi, we use Samsung devices that we provisition in Kiosk mode: We set our app as device owner and starting it in Lock Task Mode. We also set screen lock to ‘None’ (although ‘Swipe’ also has the same issue).

Steps:

  1. Wait for screen to turn off by itself
  2. Turn device back on -> Our app is in the foreground
  3. Attempt to read NFC token -> Token cannot be read

We realised that the keyguard would be enabled after the third step. If we stop Lock Task Mode, we can see the lock screen running, and we need to swipe it away to continue.

Another issue is that we cannot access the Global Actions Menu by long pressing the power button, even as we specifically allow it via setLockTaskFeatures().
–Later edit–
This is due to Bixby being mapped to the side button. My bad.

A sample app based on Google’s code can be found here: