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

getAlpnSelectedProtocol android 15 changes #11625

Open
VEZE opened this issue Oct 18, 2024 · 1 comment
Open

getAlpnSelectedProtocol android 15 changes #11625

VEZE opened this issue Oct 18, 2024 · 1 comment

Comments

@VEZE
Copy link

VEZE commented Oct 18, 2024

This method marked as max-target-q on android 15 chagelog.
Lcom/android/org/conscrypt/OpenSSLSocketImpl->getAlpnSelectedProtocol()[B,core-platform-api,max-target-q

Method may fall under the category of APIs that are conditionally blocked based on the target API level of the app. Specifically, if app targets a version higher than Android 10 (API level 29), we might encounter restrictions accessing this method due to non-SDK interface policies.

What version of gRPC-Java are you using?

1.66.0

What is your environment?

Android

What did you expect to see?

Nothing in strictMode logs.

What did you see instead?

Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
io.grpc.okhttp.internal.OptionalMethod.getPublicMethod (OptionalMethod.java:178)

Steps to reproduce the bug

Enabling strictMode with non sdk api violations logging.

    StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
            .detectNonSdkApiUsage()
            .penaltyLog()
            .build());
@kannanjgithub
Copy link
Contributor

In the android documentation for "Expected behavior when restricted non-SDK interfaces are accessed" it says "NoSuchMethodError" will be thrown for "Reflection using Class.getDeclaredMethod(), Class.getMethod()", which is handled and ignored in gRPC okhttp code. So it should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants