From 7142fa7378f5c867aa714127548e72608cb78cb1 Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 2 Aug 2019 14:05:59 +0800 Subject: [PATCH] Fix lint check --- mobile/src/main/java/be/mygod/vpnhotspot/RepeaterService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/RepeaterService.kt b/mobile/src/main/java/be/mygod/vpnhotspot/RepeaterService.kt index 0dd31e97..89c4e46e 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/RepeaterService.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/RepeaterService.kt @@ -251,6 +251,7 @@ class RepeaterService : Service(), CoroutineScope, WifiP2pManager.ChannelListene */ override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { if (status != Status.IDLE) return START_NOT_STICKY + val channel = channel ?: return START_NOT_STICKY.also { stopSelf() } status = Status.STARTING // show invisible foreground notification on television to avoid being killed if (Build.VERSION.SDK_INT >= 26 && app.uiMode.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION) { @@ -273,7 +274,7 @@ class RepeaterService : Service(), CoroutineScope, WifiP2pManager.ChannelListene } } } - } catch (e: RuntimeException) { + } catch (e: SecurityException) { Timber.w(e) startFailure(e.readableMessage) }