Skip to content
Commit 4f4b74bb authored by Bill Lin's avatar Bill Lin
Browse files

Hook WakefulnessLifecycle for best timing of LockedDisabled

1. Sets LockedDisabled when onStartedGoingToSleep()
2. Reset LockedDisabled when onFinishedWakingUp()
3. Update keyguard showing state to controller through
   onKeyguardVisibilityChanged(showing)

The flow changes:
 1) POWER-KEY going to sleep(AOD)
 2) onStartedGoingToSleep()   <--New timing for LockedDisabled
 3) onFinishedGoingToSleep()
 4) onKeyguardVisibilityChanged(true) <--Legacy LockedDisabled
 ---------------
 1) POWER-KEY waking up to HOME
 2) onStartedWakingUp()
 3) onFinishedWakingUp()
 4) onKeyguardVisibilityChanged(false) <--Reset LockedDisabled

Screen OFF to AOD flow takes about 1800ms:
  POWER_KEY---(400ms)---> onStartedGoingToSleep()---(100ms)--->
  onFinishedGoingToSleep()---(1300ms)--->onKeyguardVisibilityChanged()

Screen ON to HOME flow takes about 700ms:
  POWER_KEY---(50ms)---> onStartedWakingUp()---(160ms)--->
  onFinishedWakingUp()---(500ms)---> onKeyguardVisibilityChanged()

Test: Manual PowerKey going to sleep > Trigger One Handed mode
Test: atest WMShellUnitTests
Bug: 191149165
Change-Id: I557ab4736d0f77b38334fb95d89dcf0875fc5be2
parent 60ec24eb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment