Hello,

Adding flags like FLAG_DISMISS_KEYGUARD, FLAG_SHOW_WHEN_LOCKED or FLAG_TURN_SCREEN_ON to Activity's getWindow() most of the time doesn't work in the workspace. The workspace's screen lock shows up and I need to type password to unlock it. The behaviour is inconsistent, on rare instances it works. Samsung S8, Android 8.0.

 

The background: I develop a fork of linphone, when on incoming call, the incoming call activity shows up, but I need to type password to accept the call. Sometimes the first activity shows up, but when I click to accept call, second Activity shows but then screen lock appears and I can't get rid of it unless I type password. They both have those flags. I created small project for showing Activity on lock screen and it works. Then when I use its onResume to show second Activity it doesn't work. It does sometimes work when I put startActivity on Handler's postDelayed. I tried starting with different flags, more delay, etc., to no avail.

 

Is there some bug on Workspace's lockscreen on Android 8.0? It works in personal space. It works normally on Android 7, I can show Activity on knox's lockscreen.