I'm trying to set the maximum time to lock with DevicePolicyManager.s开发者_如何学运维etMaximumTimeToLock()
, but this seems to have no effect. Admin-mode is enabled and lockNow()
works without a problem.
Is there anything else that needs to be done to use setMaximumTimeToLock()
?
tgr
Are trying to keep your screen from going off? Use this in your onCreate. I believe it has to go before calling setContentView.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
精彩评论