Skip to content

Fold EchAwareDns into AndroidDns - #9645

Merged
swankjesse merged 2 commits into
mainfrom
jwilson.0809.EchAwareDns_fold
Aug 10, 2026
Merged

Fold EchAwareDns into AndroidDns#9645
swankjesse merged 2 commits into
mainfrom
jwilson.0809.EchAwareDns_fold

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

I don't think each DNS feature should be its own DNS class; instead the single DNS implementation should be configurable.

None of these classes have shipped in a stable release, so there's no risk of breaking backwards-compatibility.

ShadowNetworkSecurityPolicy::class,
],
)
class AndroidDnsRobolectricTest {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed from EchAwareDnsTest, and changed a lot!

companion object {
fun create(dns: FakeDns): Network {
val result = Shadow.newInstanceOf(Network::class.java)
Shadow.extract<ShadowNetwork>(result).dns = dns

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sample landed - so will need to update samples/android/src/androidTest/kotlin/okhttp3/sample/ech/EchClientTest.kt

public fun <init> ()V
public fun <init> (Lokhttp3/Dns;Lokhttp3/Dns;Landroid/security/NetworkSecurityPolicy;)V
public synthetic fun <init> (Lokhttp3/Dns;Lokhttp3/Dns;Landroid/security/NetworkSecurityPolicy;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Landroid/net/DnsResolver;Landroid/net/Network;Lokhttp3/DnsCache;Z)V

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the sea of red is nice.

@yschimke yschimke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice cleanup

I don't think each DNS feature should be its own DNS class; instead the single
DNS implementation should be configurable.

None of these classes have shipped in a stable release, so there's no risk
of breaking backwards-compatibility.
@swankjesse
swankjesse force-pushed the jwilson.0809.EchAwareDns_fold branch from 6763a4f to 1ad1f7a Compare August 10, 2026 16:46
@swankjesse
swankjesse merged commit 5e0b9d7 into main Aug 10, 2026
24 of 26 checks passed
@swankjesse
swankjesse deleted the jwilson.0809.EchAwareDns_fold branch August 10, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants