From 0c36bcbade50ccc3a14ad26a76460da08d07305b Mon Sep 17 00:00:00 2001 From: Mygod Date: Sat, 24 Jul 2021 23:29:50 -0400 Subject: [PATCH] Prevent Binder stub swallowing Exceptions --- .../main/java/be/mygod/vpnhotspot/net/TetheringManager.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt index 56ac2303..932eecbd 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt @@ -66,7 +66,11 @@ object TetheringManager { } private object InPlaceExecutor : Executor { - override fun execute(command: Runnable) = command.run() + override fun execute(command: Runnable) = try { + command.run() + } catch (e: Exception) { + Timber.w(e) // prevent Binder stub swallowing the exception + } } /**