Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10455df7 authored by Marcus Hoffmann's avatar Marcus Hoffmann Committed by Marvin W.
Browse files

also catch potential stopAdvertising exceptions

parent 88d14e9e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -218,7 +218,11 @@ class AdvertiserService : LifecycleService() {
                Log.i(TAG, "Tried calling stopAdvertisingSet without android.permission.BLUETOOTH_ADVERTISE permission.", )
            }
        } else {
            try {
                advertiser?.stopAdvertising(callback)
            } catch (e: SecurityException) {
                Log.i(TAG, "stopAdvertising() failed with a SecurityException. Maybe some permissions are missing?", )
            }
        }
        handler.postDelayed(startLaterRunnable, 1000)
    }