因项目需求需要去掉开机锁屏界面
android5.1修改如下:
frameworks/base/core/res/res/values/config.xml
<bool name="config_dreamsSupported">false</bool>
<bool name="config_dreamsEnabledByDefault">false</bool>
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
<bool name="def_lockscreen_disabled">true</bool>
frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
public void goToSleep(long eventTime, int reason, int flags) {
if (true){ return; }
解决问题