设置默认锁屏时间frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
private void loadSystemSettings(SQLiteDatabase db) {
loadIntegerSetting(stmt,Settings.System.SCREEN_OFF_TIMEOUT,R.integer.def_screen_off_timeout);
}
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
<integer name="def_screen_off_timeout">-1</integer>
以毫秒为单位,设为-1即可,重新编译Setting Provider模块但是只是这样修改的话,启动后依旧会进入锁屏状态,解锁之后就再也不会锁屏了开机不锁屏
frameworks/base/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
/**
* External apps (like the phone app) can tell us to disable the keygaurd.
*/
private boolean mExternallyEnabled = true;改为false
网友评论