Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix theme native object collection in Android S
Previously, in Android P through R, Robolectric would clean up native themes from the registry when AssetManager.nativeThemeDestroy was called by the ThemeImpl finalizer. However, starting in Android S, AssetManager.nativeThemeDestroy does not exist any more. As a workaround, hook into the AssetManager.releaseTheme method to free the theme from the registry. Longer term we may want to have the theme destruction logic be part of AssetManager.nativeDestroy, where all themes can potentially be freed in one fell swoop. This should fix #6872. Thanks to @calvarez-ov for reporting the issue and helping debug :) PiperOrigin-RevId: 411169531
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters