From 895613c00b0a6a79a58b7b06d5b83044fedcf32b Mon Sep 17 00:00:00 2001 From: Mygod Date: Mon, 8 Jul 2019 11:28:37 +0800 Subject: [PATCH] Be more helpful about logging allowedKeyMgmt --- .../vpnhotspot/net/wifi/configuration/WifiConfiguration.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt index 4d4af614..46b02fa7 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt @@ -71,7 +71,9 @@ fun frequencyToChannel(frequency: Int) = when (frequency % 5) { } val WifiConfiguration.apKeyManagement get() = allowedKeyManagement.nextSetBit(0).let { selected -> - check(allowedKeyManagement.nextSetBit(selected + 1) < 0) { "More than 1 key managements supplied" } + check(allowedKeyManagement.nextSetBit(selected + 1) < 0) { + "More than 1 key managements supplied: $allowedKeyManagement" + } if (selected < 0) WifiConfiguration.KeyMgmt.NONE else selected // getAuthType returns NONE if nothing is selected }