微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > 设置锁屏方式为FaceUnlock/VoiceUnlock, 关机再开机, 开机第一次的锁屏方式不是Fac...

设置锁屏方式为FaceUnlock/VoiceUnlock, 关机再开机, 开机第一次的锁屏方式不是Fac...

时间:10-02 整理:3721RD 点击:
设置锁屏方式为FaceUnlock/VoiceUnlock, 关机再开机, 开机第一次的锁屏方式不是FaceUnlock/VoiceUnlock,而是backup锁屏

这是 google default design.
Google design下,在第一次的开机后,先挡掉face unlock, (mtk voice unlock也follow此
rule)。要在下一次的screen off / on , 之后,才启用 voice unlock.
google的理由是刚开机的时候,并不是所有的服务都已经ready, 为避免意外的失败,开完机第一次
keyguard先采用用户设置的backup模式。 对比机nexus 的face unlock, 也是这样的行为。
===========================================================
In KeyguardViewMediator.java
public void onSystemReady() {
.....
// Suppress biometric unlock right after boot until things have settled if it is the
// selected security method, otherwise unsuppress it. It must be unsuppressed if it is
// not the selected security method for the following reason: if the user starts
// without a screen lock selected, the biometric unlock would be suppressed the first
// time they try to use it.
//
// Note that the biometric unlock will still not show if it is not the selected method.
// Calling setALTErnateUnlockEnabled(true) SIMply says don't suppress it if it is the
// selected method.
if (mLockPatternUtils.usingBiometricWeak()
&& mLockPatternUtils.isBiometricWeakInstalled()
|| mLockPatternUtils.usingVoiceWeak()
&& FeatureOption.MTK_VOICE_UNLOCK_SUPPORT) {
if (DEBUG) Log.d(TAG, "suppressing biometric unlock during boot");
mUpdateMonitor.setAlternateUnlockEnabled(false);
============================================================
这部分建议维持android default design,以免发生不可预期的错误。

顶贴也要乘早

学习了~~~~~~~~

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top