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

android: Use Provider to construct OkHttpChannelBuilder #9003

Merged
merged 1 commit into from Mar 24, 2022

Commits on Mar 21, 2022

  1. android: Use Provider to construct OkHttpChannelBuilder

    Doing any reflection on OkHttpChannelBuilder requires that all methods
    can have their arguments resolved. We'd like to make okhttp an optional
    dependency (to support okhttp 2 and 3/4 simultaneously). But making
    okhttp optional means we can no longer construct OkHttpChannelBuilder
    reflectively. We swap to the Provider that doesn't have this problem.
    See grpc#8971.
    
    Note that ManagedChannelProvider itself only exposes its methods as
    protected, so they wouldn't be accessible. However OkHttpChannelProvider
    has its methods public. It is an open question of whether
    ManagedChannelProvider's methods should become public, but in any case
    we can hide a public OkHttpChannelProvider inside a package-private
    class so it is only accessable via reflection. So this code assuming
    public methods doesn't prevent future implementation hiding.
    ejona86 committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    fa1080c View commit details
    Browse the repository at this point in the history