Cancel animation before destroying of SurfaceControl.
It can occur that access invalid SurfaceControl.
And this makes NullPointerException at runtime.
*** FATAL EXCEPTION IN SYSTEM PROCESS:android.anim.lf
java.lang.NullPointerException: mNativeObject is null.
Have you called release() already?
at android.view.SurfaceControl.checkNotReleased
We need to cancel animation before removing SurfaceControl
Bug: 150438558
Test: Existing tests pass.
Open an app in freeform and maximize/restore it.
Maximize freeform and press recent concurrently.
Change-Id: I95d319f66e0d571d270ed8295768bec6f1cbb0dd
1 file changed