不积跬步无以至千里
一.前摘
测试提了如下一个bug:
怎么解锁界面的提示语没了呢?而且确实是触摸指纹感应器都会清楚提示语。
二.分析
通过打印提示语控件 KeyguardMessageArea的方法setMessage的调用栈,发现其中的调用是通过如下代码逻辑:
app/src/com/android/keyguard/KeyguardAbsKeyInputView.java
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Fingerprint sensor sends a KeyEvent.KEYCODE_UNKNOWN.
// We don't want to consider it valid user input because the UI
// will already respond to the event.
if (keyCode != KeyEvent.KEYCODE_UNKNOWN) {
onUserInput();
}
return