[Android] Disable ota updates on fdroid builds

pull/4720/head
Martín Fernández 5 years ago committed by Frans de Jonge
parent ae0861eda8
commit be407d1059

@ -10,6 +10,11 @@ local T = require("ffi/util").template
local function yes() return true end
local function no() return false end
local function canUpdateApk()
-- disable updates on fdroid builds, since they manage their own repo.
return (android.getFlavor() ~= "fdroid")
end
local Device = Generic:new{
model = android.getProduct(),
hasKeys = yes,
@ -21,7 +26,7 @@ local Device = Generic:new{
display_dpi = android.lib.AConfiguration_getDensity(android.app.config),
hasClipboard = yes,
hasColorScreen = yes,
hasOTAUpdates = yes,
hasOTAUpdates = canUpdateApk,
}
function Device:init()
@ -140,7 +145,7 @@ local function getCodename()
return codename or ""
end
android.LOGI(string.format("Android %s - %s (API %d)",
android.getVersion(), getCodename(), Device.firmware_rev))
android.LOGI(string.format("Android %s - %s (API %d) - flavor: %s",
android.getVersion(), getCodename(), Device.firmware_rev, android.getFlavor()))
return Device

Loading…
Cancel
Save