1.defect:7033783 指纹解锁太慢流程
ALPS03313857:
1)、指纹解锁的大致flow 如下:
sensor上报校验成功
。。。
//keyguard处理
==>FingerprintUnlockController.onFingerprintAuthenticated
==>KeyguardViewMediator.keyguardDone
==>KeyguardViewMediator.mKeyguardGoingAwayRunnable
==>ActivityManagerNative.getDefault().keyguardGoingAway(flags);
// Don't actually hide the Keyguard at the moment, wait for window
// manager until it tells us it's safe to do so with
// startKeyguardExitAnimation.
ActivityManagerNative.getDefault().keyguardGoingAway(flags);
==>AMS/WMS进行一系列处理操作
...
==>PhoneWindowManager.startKeyguardExitAnimation
==>KeyguardViewMediator.startKeyguardExitAnimation->handleStartKeyguardExitAnimation
==>mStatusBarKeyguardViewManager.hide(startTime, fadeoutDuration);
//hide方法中执行animateScrimControllerKeyguardFadingOut等操作
//之后进行一些状态刷新,收起NotificationPanel界面等操作。
//->StatusBarKeyguardViewManager.updateStates->updateMonitor.onKeyguardVisibilityChanged(showing && !occluded);-==>KeyguardUpdateMonitor.onKeyguardVisibilityChanged->updateFingerprintListeningState
==>mPhoneStatusBar.hideKeyguard();->instantCollapseNotificationPanel
==>PanelView.instantCollapse->notifyBarPanelExpansionChanged
建议是在关键时间点添加些log,看下是否有比较明显耗时的地方。
7033783
05-22 18:01:01.786076 1052 1052 I FingerprintController: releasing fp wakelock
//wms 这边准备好,通知锁屏可以退出
05-22 18:01:02.162578 889 936 D WindowManager: PWM.startKeyguardExitAnimation
//锁屏这边回调onDrawn
05-22 18:01:02.258416 889 1152 D WindowManager: mKeyguardDelegate.ShowListener.onDrawn.
05-22 18:01:02.258742 889 919 I WindowManager: Waiting for drawn Window{d5b908d u0 StatusBar}: removed=false visible=true mHasSurface=true drawState=1
。。。。//等待statusbar绘制完成
05-22 18:01:02.431158 889 936 I WindowManager: Waiting for drawn Window{d5b908d u0 StatusBar}: removed=false visible=true mHasSurface=true drawState=4
//等待所有window ready 才会去亮屏
05-22 18:01:02.473423 889 936 I WindowManager: All windows ready for display!
05-22 18:01:02.483838 889 943 I DisplayPowerController: Unblocked screen on after 718 ms
指纹解锁flow如下:
->FingerprintUnlockController.onFingerprintAuthenticated
->KeyguardViewMediator.onWakeAndUnlocking->keyguardDone->handleKeyguardDone
->KeyguardViewMediator.mKeyguardGoingAwayRunnable
->ActivityManagerNative.getDefault().keyguardGoingAway(flags);
// Don't actually hide the Keyguard at the moment, wait for window
// manager until it tells us it's safe to do so with
// startKeyguardExitAnimation.
ActivityManagerNative.getDefault().keyguardGoingAway(flags);
->AMS/WMS进行一系列处理操作
->PhoneWindowManager.startKeyguardExitAnimation
->KeyguardService.startKeyguardExitAnimation
->KeyguardViewMediator.startKeyguardExitAnimation->handleStartKeyguardExitAnimation
->PhoneWindowManager.mKeyguardDrawnCallback.onDrawn