Write our own DNS message reader#9541
Merged
Merged
Conversation
Collaborator
Author
|
I want to add support for |
JakeWharton
approved these changes
Jul 14, 2026
| val responseCode: Int | ||
| get() = (flags and 0b0000_0000_0000_1111) | ||
|
|
||
| // Avoid Short.hashCode(short) which isn't available on Android 5. |
Collaborator
There was a problem hiding this comment.
You'd have to be using an 8-year-old version of AGP to not get this automatically desugared by D8/R8: https://r8.googlesource.com/r8/+/516a6684f134d06eff08080e7ef7129517071817
Collaborator
Author
There was a problem hiding this comment.
I’ll follow-up to fix our Animal Sniffer config, which doesn’t know that R8 can do stuff like this
yschimke
reviewed
Jul 14, 2026
| @get:JvmName("post") val post: Boolean, | ||
| @get:JvmName("resolvePrivateAddresses") val resolvePrivateAddresses: Boolean, | ||
| @get:JvmName("resolvePublicAddresses") val resolvePublicAddresses: Boolean, | ||
| ) : Dns { |
Collaborator
There was a problem hiding this comment.
I guess this one is stuck on Dns forever, but maybe it can just call the Dns2 impl?
Collaborator
Author
There was a problem hiding this comment.
No, I want this to implement Dns2 ASAP
yschimke
reviewed
Jul 14, 2026
| } | ||
|
|
||
| val responseBytes = body.source().readByteString() | ||
| val dnsResponse = DnsMessageReader(body.source()).read() |
yschimke
approved these changes
Jul 14, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.