实现当android开启图案解锁时,取消滑动解锁
2013-05-05 14:22:13 来源:WEB开发网如果想修改成一层锁的话,需要修改如下:
LockPatternKeyguardView.java 中:
private Mode getInitialMode() {
IccCard.State simState2 = IccCard.State.NOT_READY;
final IccCard.State simState = mUpdateMonitor.getSimState();
if(FeatureOption.MTK_GEMINI_SUPPORT == true)
{
simState2 = mUpdateMonitor.getSimStateGemini(Phone.GEMINI_SIM_2);
}
if (stuckOnLockScreenBecauseSimMissing()) {
return Mode.LockScreen;
} else {
// Show LockScreen first for any screen other than Pattern unlock.
/*final boolean usingLockPattern = mLockPatternUtils.getKeyguardStoredPasswordQuality()
== DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;*/
final boolean usingPINLock = IsSIMPINRequired();
Log.i(TAG,"usingLockPattern="+usingPINLock);
if (isSecure() && usingPINLock) {
return Mode.UnlockScreen;
} else {
return Mode.LockScreen;
}
}
}
还原成如下:
} else {
// Show LockScreen first for any screen other than Pattern unlock.
final boolean usingLockPattern = mLockPatternUtils.getKeyguardStoredPasswordQuality()
== DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
/* final boolean usingPINLock = IsSIMPINRequired();
Log.i(TAG,"usingLockPattern="+usingPINLock);*/
if (isSecure() && usingLockPattern) {
return Mode.UnlockScreen;
} else {
return Mode.LockScreen;
}
- ››Android 当修改一些代码时,使用什么编译命令可以最...
- ››Android 如何添加一个apk使模拟器和真机都编译进去...
- ››Android 修改Camera拍照的默认保存路径
- ››Android 如何修改默认输入法
- ››android开发中finish()和System.exit(0)的区别
- ››Android手势识别简单封装类
- ››android中查看项目数字证书的两种方法
- ››Android中获取IMEI码的办法
- ››android 相机报错 setParameters failed
- ››Android重启运用程序的代码
- ››Android为ListView的Item设置不同的布局
- ››android bitmap与base64字符串的互相转换
更多精彩
赞助商链接