Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61451cc6 authored by Steve Elliott's avatar Steve Elliott Committed by Gerrit Code Review
Browse files

Merge "Replace usage of deprecated coroutines methods"

parents e33a883a 08852315
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.awaitCancellation
import kotlinx.coroutines.cancel
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.channels.sendBlocking
import kotlinx.coroutines.channels.trySendBlocking
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
@@ -567,7 +566,7 @@ class Host(private val context: Context, private val server: Server) : HostImplB
        val callback =
          object : ScanCallback() {
            override fun onScanResult(callbackType: Int, result: ScanResult) {
              sendBlocking(
              trySendBlocking(
                RunDiscoveryResponse.newBuilder()
                  .setDevice(
                    Device.newBuilder()
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ fun <T, U> grpcBidirectionalStream(
    override fun onNext(req: T) {
      // Note: this should be made a blocking call, and the handler should run in a separate thread
      // so we get flow control - but for now we can live with this
      if (!inputChannel.offer(req)) {
      if (inputChannel.trySend(req).isFailure) {
        job.cancel(CancellationException("too many incoming requests, buffer exceeded"))
        responseObserver.onError(
          CancellationException("too many incoming requests, buffer exceeded")