Reuse overlay view between two Visibility transitions

Bug: 31362791

Instead of creating a new screenshot of the view every time previous visibility transition already did it or just added our startView to the overlay we can cache it and apply the animation to the same reused view. So the behaviour is the same(and expected) like in the case when no overlay is used.

Test: test added in VisibilityTest
Fix in AndroidX: aosp/772713
Change-Id: Iba4ab168722595eb19b9c681649a976462a5532b
6 files changed