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 {
165
165
implementation(" com.squareup.okhttp:okhttp:2.7.5" )
166
166
implementation(" com.squareup.okhttp3:okhttp:4.9.3" )
167
167
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" )
170
170
implementation(" androidx.collection:collection:1.2.0" )
171
171
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" )
175
173
}
176
174
177
175
tasks.named(" publishToMavenLocal" ).configure {
Original file line number Diff line number Diff line change 1
1
package android.net
2
2
3
- import io.netty.handler.codec.http.QueryStringDecoder
4
3
import java.net.URI
4
+ import java.util.*
5
5
6
6
class Uri (private val uri : URI ) {
7
7
@@ -10,12 +10,25 @@ class Uri(private val uri: URI) {
10
10
fun parse (uriString : String ) = Uri (URI .create(uriString))
11
11
}
12
12
13
- private val parameters by lazy {
14
- QueryStringDecoder (uri).parameters()
15
- }
16
-
17
13
val scheme get() = uri.scheme
18
14
val port get() = uri.port
19
15
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 1
1
package com.google.firebase
2
2
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
-
9
3
abstract class FirebasePlatform {
10
4
11
5
companion object {
@@ -16,18 +10,6 @@ abstract class FirebasePlatform {
16
10
firebasePlatform = platform
17
11
// prevent coroutines from thinking its on android
18
12
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
- )
31
13
}
32
14
}
33
15
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments