android2.3 取消开机锁屏

代码在:

frameworks/base/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java

有如下一段代码:

    // these are protected by synchronized (this)

    /**
     * External apps (like the phone app) can tell us to disable the keygaurd.
     */
    private boolean mExternallyEnabled = true;
将:
    private boolean mExternallyEnabled = true;
修改为:
    private boolean mExternallyEnabled = false;
就可以取消开机自动锁屏了,如果要重新设置,可能通过应用程序调用setKeyguardEnabled方法显示打开这个功能

你可能感兴趣的:(android2.3 取消开机锁屏)