Add Device:Info for android and use it in report a bug infomessage.

Move local function getCodename to top, use android.app.activity.sdkVersion directly,
instead of relying on Device.firmware_rev
This commit is contained in:
Martín Fernández
2019-06-19 01:57:52 +02:00
parent c60d672b04
commit 75ff5dcaae
2 changed files with 50 additions and 27 deletions

View File

@@ -53,10 +53,14 @@ common_info.report_bug = {
text = _("Report a bug"),
keep_menu_open = true,
callback = function()
local model = Device.model
local device = Device.model
if Device:isAndroid() then
device = Device:info()
end
UIManager:show(InfoMessage:new{
text = T(_("Please report bugs to \nhttps://github.com/koreader/koreader/issues\n\nVersion:\n%1\n\nDetected device:\n%2"),
version, model),
version, device),
})
end
}