Skip to content
Commit 9979a51e authored by wilsonshih's avatar wilsonshih
Browse files

Replace ActivityRecord#mSetToSleep by canTurnScreenOn

The member ActivityRecord#mSetToSleep can be replaced by checking
canTurnScreenOn & mCurrentLaunchCanTurnScreenOn.

Before Task#goToSleep been called, the display will be set to sleeping
in RootWindowContainer#applySleepTokens, so when checking
ActivityRecord#shouldBeVisibleUnchecked while display is sleeping,
we only need to perform an additional check whether this activity can
turn screen on.
This is because there are only two ways to apply sleep token, which
are keyguard and screen state, and we have checked the keyguard
visibility through KeyguardController#checkKeyguardVisibility.

Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
KeyguardTransitionTests
Test: atest ActivityRecordTests
Bug: 163993448

Change-Id: I64cf04e3037ab9ca7afec9d1c8bf65d202a02e36
parent 9a095a4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment