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

Use real Android code for ContentProviderClient.release #6908

Merged
merged 1 commit into from Dec 6, 2021

Commits on Dec 6, 2021

  1. Use real Android code for ContentProviderClient.release

    This fixes two issues:
    1) Because 'release' was shadowed, the underlying CloseGuard for the
    ContentProviderClient was never closed, leading to CloseGuard errors that could
    not be suppressed.
    
    2) The behavior of 'release' was not correct for SDK > 23, where calling it
    multiple times does not result in an IllegalStateException.
    
    Also, update ShadowContentProviderClientTest to use a real ContentProvider, and
    remove the interaction test. Trying to release a ContentProviderClient for a
    mock ContentProvider results in an exception.
    
    PiperOrigin-RevId: 413795247
    hoisie committed Dec 6, 2021
    Copy the full SHA
    5082bcc View commit details
    Browse the repository at this point in the history