From a2e6eb09f1369459425d950d2288373d2911143a Mon Sep 17 00:00:00 2001 From: Fredy Wijaya Date: Thu, 7 Mar 2024 20:38:22 +0000 Subject: [PATCH] Fix more stuff Signed-off-by: Fredy Wijaya --- mobile/docs/root/api/http.rst | 6 +++--- mobile/examples/java/hello_world/MainActivity.java | 3 +-- mobile/examples/kotlin/hello_world/MainActivity.kt | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mobile/docs/root/api/http.rst b/mobile/docs/root/api/http.rst index c8dce9ee4673..f745474e779b 100644 --- a/mobile/docs/root/api/http.rst +++ b/mobile/docs/root/api/http.rst @@ -33,7 +33,7 @@ Start and interact with an HTTP stream in **Kotlin**:: } .setOnError { ... } .setOnCancel { ... } - .start(Executors.newSingleThreadExecutor()) + .start() .sendHeaders(...) .sendData(...) @@ -166,7 +166,7 @@ Doing so returns a ``Stream`` which allows the sender to interact with the strea .newStreamPrototype() ... val stream = prototype - .start(Executors.newSingleThreadExecutor()) + .start() .sendHeaders(...) .sendData(...) @@ -215,7 +215,7 @@ For example: .build() val stream = streamClient .newStreamPrototype() - .start(Executors.newSingleThreadExecutor()) + .start() // Headers-only stream.sendHeaders(requestHeaders, true) diff --git a/mobile/examples/java/hello_world/MainActivity.java b/mobile/examples/java/hello_world/MainActivity.java index 53d36ac6f573..4f73219542c9 100644 --- a/mobile/examples/java/hello_world/MainActivity.java +++ b/mobile/examples/java/hello_world/MainActivity.java @@ -22,7 +22,6 @@ import io.envoyproxy.envoymobile.shared.Success; import kotlin.Unit; -import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.Arrays; import java.util.HashSet; @@ -131,7 +130,7 @@ private void makeRequest() { recyclerView.post(() -> viewAdapter.add(new Failure(message))); return Unit.INSTANCE; }) - .start(Executors.newSingleThreadExecutor()) + .start() .sendHeaders(requestHeaders, true); clear_text = !clear_text; diff --git a/mobile/examples/kotlin/hello_world/MainActivity.kt b/mobile/examples/kotlin/hello_world/MainActivity.kt index 1a59ccf6916f..f120ca1a61ab 100644 --- a/mobile/examples/kotlin/hello_world/MainActivity.kt +++ b/mobile/examples/kotlin/hello_world/MainActivity.kt @@ -18,7 +18,6 @@ import io.envoyproxy.envoymobile.shared.Failure import io.envoyproxy.envoymobile.shared.ResponseRecyclerViewAdapter import io.envoyproxy.envoymobile.shared.Success import java.io.IOException -import java.util.concurrent.Executors import java.util.concurrent.TimeUnit private const val REQUEST_HANDLER_THREAD_NAME = "hello_envoy_kt" @@ -141,7 +140,7 @@ class MainActivity : Activity() { Log.d("MainActivity", message) recyclerView.post { viewAdapter.add(Failure(message)) } } - .start(Executors.newSingleThreadExecutor()) + .start() .sendHeaders(requestHeaders, true) }