various Android fix

now the android build has nearly the same features as the
Kindle/Kobo build. It's time for Android nightly build?
pull/596/head
chrox 10 years ago
parent bc09241c2d
commit f507fd3709

@ -128,8 +128,9 @@ koboupdate: all
androidupdate: all
mkdir -p $(ANDROID_LAUNCHER_DIR)/assets/module
-rm $(ANDROID_LAUNCHER_DIR)/assets/module/koreader-*
cd $(INSTALL_DIR)/koreader && 7z a -l -mx=3 \
../../$(ANDROID_LAUNCHER_DIR)/assets/module/koreader-g$(REVISION).7z *
cd $(INSTALL_DIR)/koreader && 7z a -l -mx=1 \
../../$(ANDROID_LAUNCHER_DIR)/assets/module/koreader-g$(REVISION).7z * \
-x!resources/fonts -x!resources/icons/src -x!spec
androiddev: androidupdate
$(MAKE) -C $(ANDROID_LAUNCHER_DIR) dev

@ -1 +1 @@
Subproject commit 675fce5766d4b9390399f454959d12e2e545b14e
Subproject commit 3153b92693a4a57cbe6e21d32f94b1f89e115633

@ -7,6 +7,7 @@ local Geom = require("ui/geometry")
local serial = require("serialize")
local Cache = require("cache")
local DEBUG = require("dbg")
local util = require("ffi/util")
local KoptInterface = {
ocrengine = "ocrengine",
@ -673,7 +674,20 @@ end
function KoptInterface:clipPagePNGString(doc, pos0, pos1, pboxes, drawer)
local kc = self:getClipPageContext(doc, pos0, pos1, pboxes, drawer)
local png = kc:exportSrcPNGString(pboxes, drawer)
-- there is no fmemopen in Android so leptonica.pixWriteMemPng will
-- fail silently, workaround is creating a PNG file and read back the string
local png = nil
if util.isAndroid() then
local tmp = "cache/tmpclippng.png"
kc:exportSrcPNGFile(pboxes, drawer, tmp)
local pngfile = io.open(tmp, "rb")
if pngfile then
png = pngfile:read("*all")
pngfile:close()
end
else
png = kc:exportSrcPNGString(pboxes, drawer)
end
kc:free()
return png
end

@ -21,7 +21,8 @@ function ButtonDialog:init()
AnyKeyPressed = { { Input.group.Any },
seqtext = "any key", doc = _("close dialog") }
}
else
end
if Device:isTouchDevice() then
self.ges_events.TapClose = {
GestureRange:new{
ges = "tap",

@ -96,10 +96,6 @@ end
function VirtualKey:invert(invert)
self[1].invert = invert
UIManager.update_region_func = function()
DEBUG("update key region", self[1].dimen)
return self[1].dimen
end
UIManager:setDirty(self.keyboard, "partial")
end

@ -1 +1 @@
Subproject commit 34a26b30c2fb85f4520c07a8b4cd3ead51297f18
Subproject commit 88e83badbc4d0a06a99d53ea5003c3e19f539f9d
Loading…
Cancel
Save