:smokingsomb:
Hi there!
My application (system app) is using Device Administration to set a global password on the Lock Screen (KeyGuard).
mDPM.resetPassword("bla", 0); works perfectly. The problem is that I'm setting the password in a Broadcast, when the Screen is turned ON or OFF. Some variables are read and the appropriate password is set (either "bla" as an example or empty string ""). When the password is set to "", I want the stock Lock Screen slider to show next time I turn the screen on. Instead a password dialog box is still shown, but just pressing OK (no String input) will unlock the tablet. Therefore the behavior is correct but the UI needs to be updated.
It is to my knowledge that using mDPM.lockNow() will refresh the Lock Screen UI and the correct "Lock Screen" (slider or password box) is shown. However, executing lockNow() will invoke another Screen OFF broadcast, therefore looping inside the Broadcast Receiver where my code is. Is there another way to refresh the Lock Screen?
Cheers!
Hi there!
My application (system app) is using Device Administration to set a global password on the Lock Screen (KeyGuard).
mDPM.resetPassword("bla", 0); works perfectly. The problem is that I'm setting the password in a Broadcast, when the Screen is turned ON or OFF. Some variables are read and the appropriate password is set (either "bla" as an example or empty string ""). When the password is set to "", I want the stock Lock Screen slider to show next time I turn the screen on. Instead a password dialog box is still shown, but just pressing OK (no String input) will unlock the tablet. Therefore the behavior is correct but the UI needs to be updated.
It is to my knowledge that using mDPM.lockNow() will refresh the Lock Screen UI and the correct "Lock Screen" (slider or password box) is shown. However, executing lockNow() will invoke another Screen OFF broadcast, therefore looping inside the Broadcast Receiver where my code is. Is there another way to refresh the Lock Screen?
Cheers!