Submit visibility to the activities after the sleep state stable
ActivityRecord#shouldBeVisible can be affected by sleep status. So in the original ensureActivityVisibility sequence: beginActivityVisibilityUpdate ensureActivityVisibility => ActivityRecord#shouldBeVisible => commit visiblity to the activity if changed endActivityVisibilityUpdate KeyguardController#visibilitiesUpdated Then if the occluding state has changed, execute above sequence again, which could change the visibility again, so previous loop become useless. Sometimes the loop cause issue like b/161036653. An idea is to let KeyguardController to handle TopActivityOccludesKeyguard and TopDismissingKeyguardActivity together to update display sleep state. And only commit the visibility to activities after sleep status is stable. In this CL the ensureActivityVisibility sequence become beginActivityVisibilityUpdate ensureActivityVisibility => ActivityRecord#updateVisibilityStatus endActivityVisibilityUpdate KeyguardController#visibilitiesUpdated if occluding state has changed, execute ensureActivityVisibility again. Then after all sleep status has changed, commit the visibility to activity. Bug: 163993448 Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests KeyguardTransitionTests AppConfigurationTests ReplaceWindowTests Test: atest ActivityRecordTests RecentTasksTest ActivityStackTests DisplayContentTests Change-Id: Ifa69ce5cc8069966c6bf2b23bad56e4b2bd286ba
Loading
Please register or sign in to comment