Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个项目中,我将在基于非触摸的显示单元上使用 android 4.4 版本。因此,我希望屏幕锁定默认为“无”,这我需要在构建中进行。那么是否有任何我可以修改的 XML 文件或变量,以便默认情况下屏幕锁定将是“无”而不是“幻灯片”?
我做了以下解决方案:
KeyguardManager km = (KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE); KeyguardLock kl = km.newKeyguardLock(Activity.KEYGUARD_SERVICE); kl.disableKeyguard();
在我的启动器代码中。