Device: Drop unused device capabilities

pull/9982/head
NiLuJe 1 year ago
parent 554520463d
commit 144706654d

@ -17,13 +17,11 @@ local function no() return false end
local Device = {
screen_saver_mode = false,
charging_mode = false,
survive_screen_saver = false,
screen_saver_lock = false,
is_cover_closed = false,
model = nil,
powerd = nil,
screen = nil,
screen_dpi_override = nil,
input = nil,
home_dir = nil,
-- For Kobo, wait at least 15 seconds before calling suspend script. Otherwise, suspend might
@ -47,7 +45,6 @@ local Device = {
hasNaturalLight = no, -- FL warmth implementation specific to NTX boards (Kobo, Cervantes)
hasNaturalLightMixer = no, -- Same, but only found on newer boards
hasNaturalLightApi = no,
needsTouchScreenProbe = no,
hasClipboard = yes, -- generic internal clipboard on all devices
hasEinkScreen = yes,
hasExternalSD = no, -- or other storage volume that cannot be accessed using the File Manager

@ -283,7 +283,6 @@ function Kindle:usbPlugIn()
-- shooting themselves in the foot (c.f., https://github.com/koreader/koreader/issues/3220)!
-- On the upside, we don't have to bother waking up the WM to show us the USBMS screen :D.
-- NOTE: If the device is put in USBNet mode before we even start, everything's peachy, though :).
self.charging_mode = true
end
function Kindle:intoScreenSaver()
@ -365,7 +364,6 @@ end
function Kindle:usbPlugOut()
-- NOTE: See usbPlugIn(), we don't have anything fancy to do here either.
self.charging_mode = false
end
function Kindle:wakeupFromSuspend()

@ -188,13 +188,6 @@ CanvasContext:init(Device)
-- Handle one time migration stuff (settings, deprecation, ...) in case of an upgrade...
require("ui/data/onetime_migration")
-- Touch screen (this may display some widget, on first install on Kobo Touch,
-- so have it done after CanvasContext:init() but before Bidi.setup() to not
-- have mirroring mess x/y probing).
if Device:needsTouchScreenProbe() then
Device:touchScreenProbe()
end
-- UI mirroring for RTL languages, and text shaping configuration
local Bidi = require("ui/bidi")
Bidi.setup(lang_locale)

@ -91,7 +91,6 @@ describe("device module", function()
local Screen = kobo_dev.screen
assert.is.same("Kobo_trilogy_C", kobo_dev.model)
assert.falsy(kobo_dev:needsTouchScreenProbe())
local x, y = Screen:getWidth()-5, 10
-- mirror x, then switch_xy
local ev_x = {
@ -140,7 +139,6 @@ describe("device module", function()
local Screen = kobo_dev.screen
assert.is.same("Kobo_trilogy_C", kobo_dev.model)
assert.falsy(kobo_dev:needsTouchScreenProbe())
local x, y = Screen:getWidth()-5, 10
local ev_x = {
type = C.EV_ABS,

Loading…
Cancel
Save