coverimage plugin (#6813)

* Plugin for saving the cover image to file. Useful in some e-ink android devices.
This commit is contained in:
zwim
2020-11-10 15:00:56 +01:00
committed by GitHub
parent 25cfef3f6d
commit 926e7dd402
5 changed files with 294 additions and 2 deletions

View File

@@ -94,7 +94,6 @@ local Device = Generic:new{
end,
canImportFiles = function() return android.app.activity.sdkVersion >= 19 end,
importFile = function(path) android.importFile(path) end,
isValidPath = function(path) return android.isPathInsideSandbox(path) end,
canShareText = yes,
doShareText = function(text) android.sendText(text) end,
@@ -376,6 +375,10 @@ function Device:canExecuteScript(file)
end
end
function Device:isValidPath(path)
return android.isPathInsideSandbox(path)
end
--swallow all events
local function processEvents()
local events = ffi.new("int[1]")