reflect changes in koreader/android-luajit-launcher#62 (#3254)

pull/3255/head
Huang Xin 7 years ago committed by GitHub
parent 8f3a5353e5
commit a4e1a3ba5e

@ -292,6 +292,8 @@ utupdate: all
androidupdate: all
mkdir -p $(ANDROID_LAUNCHER_DIR)/assets/module
-rm $(ANDROID_LAUNCHER_DIR)/assets/module/koreader-*
# in runtime luajit-launcher's libluajit.so will be loaded
-rm $(INSTALL_DIR)/koreader/libs/libluajit.so
# create zip package
cd $(INSTALL_DIR)/koreader && \
zip -9 -r \

@ -13,7 +13,7 @@ local Device = Generic:new{
isAndroid = yes,
hasFrontlight = yes,
firmware_rev = "none",
display_dpi = ffi.C.AConfiguration_getDensity(android.app.config),
display_dpi = android.lib.AConfiguration_getDensity(android.app.config),
}
function Device:init()
@ -35,13 +35,13 @@ function Device:init()
}
-- check if we have a keyboard
if ffi.C.AConfiguration_getKeyboard(android.app.config)
if android.lib.AConfiguration_getKeyboard(android.app.config)
== ffi.C.ACONFIGURATION_KEYBOARD_QWERTY
then
self.hasKeyboard = yes
end
-- check if we have a touchscreen
if ffi.C.AConfiguration_getTouchscreen(android.app.config)
if android.lib.AConfiguration_getTouchscreen(android.app.config)
~= ffi.C.ACONFIGURATION_TOUCHSCREEN_NOTOUCH
then
self.isTouchDevice = yes

@ -7,11 +7,13 @@ local AndroidPowerD = BasePowerD:new{
}
function AndroidPowerD:frontlightIntensityHW()
return android.getScreenBrightness()
return math.floor(android.getScreenBrightness() / 255 * self.fl_max)
end
function AndroidPowerD:setIntensityHW(intensity)
android.setScreenBrightness(math.floor(255 * intensity / 25))
if self.fl_intensity ~= intensity then
android.setScreenBrightness(math.floor(255 * intensity / self.fl_max))
end
end
function AndroidPowerD:getCapacityHW()

@ -166,6 +166,9 @@ function Device:initNetworkManager() end
function Device:supportsScreensaver() return false end
-- Device specific method to set datetime
function Device:setDateTime(year, month, day, hour, min, sec) end
-- Device specific method if any setting needs being saved
function Device:saveSettings() end

@ -106,9 +106,9 @@ end
if isAndroid then
local ffi = require("ffi")
local buf = ffi.new("char[?]", 16)
ffi.C.AConfiguration_getLanguage(android.app.config, buf)
android.lib.AConfiguration_getLanguage(android.app.config, buf)
local lang = ffi.string(buf)
ffi.C.AConfiguration_getCountry(android.app.config, buf)
android.lib.AConfiguration_getCountry(android.app.config, buf)
local country = ffi.string(buf)
if lang and country then
GetText.changeLang(lang.."_"..country)

@ -46,8 +46,9 @@ local function update()
end
-- (Disabled, since we hide navbar on start now no need for this hack)
-- run koreader patch before koreader startup
pcall(function() dofile("/sdcard/koreader/patch.lua") end)
-- pcall(function() dofile("/sdcard/koreader/patch.lua") end)
-- set proper permission for sdcv
A.execute("chmod", "755", "./sdcv")

@ -1 +1 @@
Subproject commit bcda26e0092400959388d5ee2be534773defda71
Subproject commit 19779beabfbd6f8195efcaa998a739f39742c71e
Loading…
Cancel
Save