Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix theme native object collection in Android S #6873

Merged
merged 1 commit into from Nov 20, 2021
Merged

Commits on Nov 20, 2021

  1. 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
    hoisie committed Nov 20, 2021
    Copy the full SHA
    23ff946 View commit details
    Browse the repository at this point in the history