[ota]: deprecation check & notice (#10639)

reviewable/pr10648/r1
Martín Fernández 10 months ago committed by GitHub
parent 346d8eb83e
commit 5336e2f11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -450,6 +450,10 @@ function Device:info()
return common_text..platform_text..eink_text..wakelocks_text
end
function Device:isDeprecated()
return self.firmware_rev < 18
end
function Device:test()
android.runTest()
end

@ -48,6 +48,7 @@ local Device = {
hasWifiManager = no,
isDefaultFullscreen = yes,
isHapticFeedbackEnabled = no,
isDeprecated = no, -- device no longer receive OTA updates
isTouchDevice = no,
hasFrontlight = no,
hasNaturalLight = no, -- FL warmth implementation specific to NTX boards (Kobo, Cervantes)

@ -153,6 +153,8 @@ function OTAManager:getZsyncFilename()
end
function OTAManager:checkUpdate()
if Device:isDeprecated() then return -1 end
local http = require("socket.http")
local ltn12 = require("ltn12")
local socket = require("socket")
@ -227,6 +229,10 @@ function OTAManager:fetchAndProcessUpdate()
UIManager:show(InfoMessage:new{
text = _("KOReader is up to date."),
})
elseif ota_version == -1 then
UIManager:show(InfoMessage:new{
text = T(_("Device no longer supported.\n\nPlease check %1"), "https://github.com/koreader/koreader/wiki/deprecated-devices")
})
elseif ota_version == nil then
local channel = ota_channels[OTAManager:getOTAChannel()]
UIManager:show(InfoMessage:new{

Loading…
Cancel
Save