mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
NetworkManager: isWifiOn isConnected consistent usage.
cervantes kindle kobo remarkable: use sysfs carrier file to determine connection state cleanup hasWifiManager checks gateway check: use ip if available Fixes: #10087 Closes: #10092
This commit is contained in:
@@ -292,12 +292,13 @@ function Device:initNetworkManager(NetworkMgr)
|
||||
android.openWifiSettings()
|
||||
end
|
||||
|
||||
function NetworkMgr:isWifiOn()
|
||||
function NetworkMgr:isConnected()
|
||||
local ok = android.getNetworkInfo()
|
||||
ok = tonumber(ok)
|
||||
if not ok then return false end
|
||||
return ok == 1
|
||||
end
|
||||
NetworkMgr.isWifiOn = NetworkMgr.isConnected
|
||||
end
|
||||
|
||||
function Device:performHapticFeedback(type)
|
||||
|
||||
Reference in New Issue
Block a user