Let the client know the initial visibility of an InsetsSourceControl
Previously, the client compares the requested visibility with the source visibility to decide if it needs to play the insets animation or not. However, the source visibility is not stable while the client is gaining the control. If the source and the control come from IWindow#insetsControlChanged, the source has the previous visibility. So the client can detect the visibility change. If the the source and the control come from IWindowSession#relayout, the visibility of the source has been overriden by the requested visibility of the client. So the client cannot detect the change and cannot play the animation. This CL lets the client know the initial visibility of the control. While gaining leash, the client can use the information to decide if it needs to play animation or not. Fix: 209064170 Fix: 238496738 Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest InsetsControllerTest InsetsSourceConsumerTest DisplayImeControllerTest Test: 1. Enable shell transitions 2. Open camera. 3. Perform back gesture. See if there is status bar animation. Change-Id: I2c02e97e191ebd83238c0c54908e861d200d4c8d
Loading
Please register or sign in to comment