Clear controls in the temp list after using them
The list would be cleared while next time we use them, so it could constantly occupy the memory. This CL clears the temp list right after we use the controls. So it won't occupy the memory while they are not being used. This CL also sends a new list to the app when dispatching the insets animation progress. In this way, we don't need to clear mTmpRunningAnims after dispatching it. Also, the app might use the animation list AFTER the 'onProgress' callback. This change can make the list stay the same. Fix: 183684434 Test: Use Android Memory Profiler to check if there is InsetsAnimationControlImpl or WindowInsetsAnimation instances after GCing after playing insets animation in Launcher. Change-Id: I781233abb2c9c8400c6f76b537bef161745e67f7
Loading
Please register or sign in to comment