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 29e9c4f4..f284f8c9 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetheringManager.kt @@ -577,7 +577,12 @@ object TetheringManager { @RequiresApi(30) fun unregisterTetheringEventCallback(callback: TetheringEventCallback) { val proxy = synchronized(callbackMap) { callbackMap.remove(callback) } ?: return - unregisterTetheringEventCallback(instance, proxy) + try { + unregisterTetheringEventCallback(instance, proxy) + } catch (e: InvocationTargetException) { + if (e.targetException !is IllegalArgumentException) throw e + Timber.e(e) // TODO: b/160765229 + } } /**