Skip immediate hiding from finishTransition
It was used to solve flickering issues when dismissing split screen
and toggling pip without transition (commit 6914f08). But since most
of visibility changes are associated with transition, and there is
new synchronization mechanism of transaction. The immediate hiding
also doesn't make visual difference in legacy transition.
Typically, if the visibility is changed, it will schedule to call
prepareSurface, which will update surface visibility according to
isVisible().
This may reduce the latency to Activity#dispatchEnterAnimationComplete.
Also
- Initialize ActivityRecord surface as invisible so it doesn't need
to update by hide() in the first prepareSurface().
- Remove unused method onSurfaceShown.
Bug: 260059642
Test: FilesAppPerfTest#testFilesColdStartPerformance
Change-Id: Icc9efecf2f078857a448f1cbeb85c865c6c8d401
2 files changed