Daniel Gomez Rico
Daniel Gomez Rico

Reputation: 15945

How to turn off screen with smart lock Lollipop Pogramatically

Is there any way to lock the phone or turn the screen off and make it work with smart lock the next time I turn it on?

If I turn it off programatically the next time that I turn on the screen it dosen't start any smart lock process and looks like I didn't have the smart lock on.

Thanks

Upvotes: 2

Views: 397

Answers (1)

erkan.molla.dev
erkan.molla.dev

Reputation: 170

You can't do that currently. Using DevicePolicyManager.lockNow() to turn off the screen and lock the device crashes the GoogleTrustAgent. There is an open issue for this bug at the Android Open Source Project see Issue 79735. Hope it will be fixed soon.

Upvotes: 3

Related Questions