NetworkListener: guard against auto_disable_wifi enabled by user on unsupported devices (#15655)
Closes #15397. Also see #15183.
This commit is contained in:
1 parent
14fcf302eb
commit
be7fc98452
1 file changed
+2
-1
@@ -181,7 +181,8 @@ function NetworkListener:onNetworkConnected()
|
||||
NetworkMgr:setWifiState(true)
|
||||
NetworkMgr:setConnectionState(true)
|
||||
|
||||
if not G_reader_settings:isTrue("auto_disable_wifi") then
|
||||
-- You can't set auto_disable_wifi on devices without getNetworkInterfaceName() but guard against it in case it was accidentally set anyway.
|
||||
if not self:getNetworkInterfaceName() or not G_reader_settings:isTrue("auto_disable_wifi") then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user