Fix a thread leak due to a race condition in BackdropFrameRenderer
There was a subtle race condition in BackdropFrameRenderer where if it is instantiated and immediately released with 'releaseRenderer', the Looper is not quit, resulting in a thread leak. Add a check for this scenario and avoid starting the Looper if this is detected. This was caught in a Robolectric environment immediately after a recent Android T jar update. It was exposed because some ViewRootImpl resize logic was changed that resulted in BackdropFrameRenderer to be created in Robolectric environments. Test: all thread leaks stopped after fix was applied Bug: 229816074 Change-Id: I525c363f827a230f3d23ee485a38d5b8a95c5beb
Loading
Please register or sign in to comment