[Kindle] Be more thorough when toggling WiFi (#6039)

Fix #6019
reviewable/pr6047/r1
NiLuJe 4 years ago committed by GitHub
parent 635f784dfd
commit 2ae796eb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,15 @@ local function kindleEnableWifi(toggle)
lipc_handle = lipc.init("com.github.koreader.networkmgr")
end
if lipc_handle then
lipc_handle:set_int_property("com.lab126.cmd", "wirelessEnable", toggle)
-- Be extremely thorough... c.f., #6019
-- NOTE: I *assume* this'll also ensure we prefer WiFi over 3G/4G, which is a plus in my book...
if toggle == 1 then
lipc_handle:set_int_property("com.lab126.cmd", "wirelessEnable", 1)
lipc_handle:set_int_property("com.lab126.wifid", "enable", 1)
else
lipc_handle:set_int_property("com.lab126.wifid", "enable", 0)
lipc_handle:set_int_property("com.lab126.cmd", "wirelessEnable", 0)
end
lipc_handle:close()
else
-- No liblipclua on FW < 5.x ;)

Loading…
Cancel
Save