Skip to content

Commit

Permalink
CronetProviderInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
rikaaa0928 committed Oct 14, 2024
1 parent 87e2eba commit 8f5c3a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/moe/rikaaa0928/uot/UogClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.Intent
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.util.Log
import com.google.android.gms.net.CronetProviderInstaller
import com.google.protobuf.ByteString
import dad.xiaomi.uog.Udp
import dad.xiaomi.uog.UdpServiceGrpcKt
Expand Down Expand Up @@ -48,6 +49,7 @@ class UogClient(val lPort: Int, val endpoint: String, val password: String) : Br
try {
val id = random.nextInt(1000);
val url = URL(endpoint)
CronetProviderInstaller.installProvider(ctx)
val engine =
ExperimentalCronetEngine.Builder(ctx /* Android Context */).build();
val builder = CronetChannelBuilder.forAddress(url.host, url.port, engine)
Expand Down

0 comments on commit 8f5c3a9

Please sign in to comment.