File tree Expand file tree Collapse file tree 4 files changed +23
-34
lines changed
Expand file tree Collapse file tree 4 files changed +23
-34
lines changed Original file line number Diff line number Diff line change @@ -165,13 +165,11 @@ dependencies {
165165 implementation(" com.squareup.okhttp:okhttp:2.7.5" )
166166 implementation(" com.squareup.okhttp3:okhttp:4.9.3" )
167167 implementation(" android.arch.lifecycle:common:1.1.1" )
168- implementation(" io.grpc:grpc-protobuf-lite:1.44 .1" )
169- implementation(" io.grpc:grpc-stub:1.44 .1" )
168+ implementation(" io.grpc:grpc-protobuf-lite:1.52 .1" )
169+ implementation(" io.grpc:grpc-stub:1.52 .1" )
170170 implementation(" androidx.collection:collection:1.2.0" )
171171 implementation(" androidx.lifecycle:lifecycle-common:2.4.0" )
172- // gprc https://github.com/grpc/grpc-java/blob/master/SECURITY.md
173- implementation(" io.grpc:grpc-netty:1.44.1" )
174- implementation(" io.netty:netty-tcnative-boringssl-static:2.0.51.Final" )
172+ implementation(" io.grpc:grpc-okhttp:1.52.1" )
175173}
176174
177175tasks.named(" publishToMavenLocal" ).configure {
Original file line number Diff line number Diff line change 11package android.net
22
3- import io.netty.handler.codec.http.QueryStringDecoder
43import java.net.URI
4+ import java.util.*
55
66class Uri (private val uri : URI ) {
77
@@ -10,12 +10,25 @@ class Uri(private val uri: URI) {
1010 fun parse (uriString : String ) = Uri (URI .create(uriString))
1111 }
1212
13- private val parameters by lazy {
14- QueryStringDecoder (uri).parameters()
15- }
16-
1713 val scheme get() = uri.scheme
1814 val port get() = uri.port
1915 val host get() = uri.host
20- fun getQueryParameter (name : String ) = parameters[name]?.first()
21- }
16+
17+ fun getQueryParameterNames (): Set <String > {
18+ val query: String = uri.query ? : return emptySet()
19+ val names: MutableSet <String > = LinkedHashSet ()
20+ var start = 0
21+ do {
22+ val next = query.indexOf(' &' , start)
23+ val end = if ((next == - 1 )) query.length else next
24+ var separator = query.indexOf(' =' , start)
25+ if (separator > end || separator == - 1 ) {
26+ separator = end
27+ }
28+ val name = query.substring(start, separator)
29+ names.add(name)
30+ // Move start to end of name.
31+ start = end + 1
32+ } while (start < query.length)
33+ return Collections .unmodifiableSet(names)
34+ }}
Original file line number Diff line number Diff line change 11package com.google.firebase
22
3- import com.google.firebase.firestore.FirebaseFirestore
4- import com.google.firebase.firestore.remote.GrpcCallProvider
5- import com.google.firebase.firestore.util.Supplier
6- import io.grpc.ManagedChannelBuilder
7- import io.grpc.netty.NettyChannelBuilder
8-
93abstract class FirebasePlatform {
104
115 companion object {
@@ -16,18 +10,6 @@ abstract class FirebasePlatform {
1610 firebasePlatform = platform
1711 // prevent coroutines from thinking its on android
1812 System .setProperty(" kotlinx.coroutines.fast.service.loader" , " false" )
19-
20- GrpcCallProvider ::class .java
21- .getDeclaredField(" overrideChannelBuilderSupplier" )
22- .apply { trySetAccessible() }
23- .set(
24- null ,
25- object : Supplier <ManagedChannelBuilder <* >> {
26- override fun get (): ManagedChannelBuilder <* > = FirebaseFirestore .getInstance(FirebaseApp .INSTANCES .values.first()).firestoreSettings.run {
27- NettyChannelBuilder .forTarget(host).also { it.takeUnless { isSslEnabled }?.usePlaintext() }
28- }
29- }
30- )
3113 }
3214 }
3315
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments