找回密码
 注册
搜索
查看: 1402|回复: 0

[资料] Android在开机时去掉锁屏

[复制链接]
发表于 2014-12-4 18:55:46 | 显示全部楼层 |阅读模式


Android4.2 在开机时去掉锁屏,有需要的朋友可以参考下。



Android4.2 在开机时去掉锁屏

frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.javapublic void onSystemReady()

{

mSearchManager = (SearchManager)mContext.getSystemService(Context.SEARCH_SERVICE); synchronized(this)

{ if (DEBUG) Log.d(TAG, "onSystemReady");

mSystemReady = true;

mUpdateMonitor.registerCallback(mUpdateCallback);// Suppress biometric unlock right after boot until things havesettled if it is the // selected security method, otherwiseunsuppress it. It must be unsuppressed if it is // not the selectedsecurity method for the following reason: if the user starts //without a screen lock selected, the biometric unlock would besuppressed the first // time they try to use it. // // Note thatthe biometric unlock will still not show if it is not the selectedmethod. // Calling setAlternateUnlockEnabled(true) simply saysdon't suppress it if it is the // selected method.

if (mLockPatternUtils.usingBiometricWeak()&& mLockPatternUtils.isBiometricWeakInstalled()) {

if (DEBUG) Log.d(TAG, "suppressing biometric unlock duringboot"); mUpdateMonitor.setAlternateUnlockEnabled(false);

} else {

mUpdateMonitor.setAlternateUnlockEnabled(true);

}

doKeyguardLocked();

} // Most services aren't available until the system reaches theready state, so we // send it here when the device first boots.

maybeSendUserPresentBroadcast();

}

把doKeyguardLocked();注释掉,重新编译系统,你开机就不会进入锁屏界面了。
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-23 03:26 , Processed in 0.043829 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表