From 4b1101f41e8ec5ed0f1ba49595806229903542ee Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 3 Jul 2020 09:12:12 +0800 Subject: [PATCH] Suppress useless logcat --- .../java/be/mygod/vpnhotspot/manage/BluetoothTethering.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/BluetoothTethering.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/BluetoothTethering.kt index d8b21250..e12c9092 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/BluetoothTethering.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/BluetoothTethering.kt @@ -12,6 +12,7 @@ import androidx.annotation.RequiresApi import be.mygod.vpnhotspot.App.Companion.app import be.mygod.vpnhotspot.net.TetheringManager import be.mygod.vpnhotspot.util.broadcastReceiver +import be.mygod.vpnhotspot.util.readableMessage import timber.log.Timber import java.lang.reflect.InvocationTargetException @@ -85,7 +86,8 @@ class BluetoothTethering(context: Context, val stateListener: () -> Unit) : pan.isTetheringOn } catch (e: InvocationTargetException) { activeFailureCause = e.cause ?: e - if (e.cause is SecurityException && Build.VERSION.SDK_INT >= 30) Timber.d(e) else Timber.w(e) + if (e.cause is SecurityException && Build.VERSION.SDK_INT >= 30) Timber.d(e.readableMessage) + else Timber.w(e) return null } }