Toggle Lockscreen On / Off

I'd like to write an app that toggles locksreen on / off on Android 9.

Can someone give me a clue?

Hi @Ray_Maruschak Welcome
Do you want to authenticate user?