[ota]: deprecation check & notice (#10639)
This commit is contained in:
1 parent
346d8eb83e
commit
5336e2f11d
3 files changed
+11
No files matched your search
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user