@ -1,4 +1,5 @@
local Generic = require ( " device/generic/device " )
local Generic = require ( " device/generic/device " )
local time = require ( " ui/time " )
local logger = require ( " logger " )
local logger = require ( " logger " )
local function yes ( ) return true end
local function yes ( ) return true end
@ -147,6 +148,8 @@ local Kindle = Generic:new{
isNightModeChallenged = no ,
isNightModeChallenged = no ,
-- NOTE: While this ought to behave on Zelda/Rex, turns out, nope, it really doesn't work on *any* of 'em :/ (c.f., ko#5884).
-- NOTE: While this ought to behave on Zelda/Rex, turns out, nope, it really doesn't work on *any* of 'em :/ (c.f., ko#5884).
canHWDither = no ,
canHWDither = no ,
-- The time the device went into suspend
suspend_time = 0 ,
}
}
function Kindle : initNetworkManager ( NetworkMgr )
function Kindle : initNetworkManager ( NetworkMgr )
@ -277,10 +280,13 @@ end
function Kindle : wakeupFromSuspend ( )
function Kindle : wakeupFromSuspend ( )
self.powerd : wakeupFromSuspend ( )
self.powerd : wakeupFromSuspend ( )
self.last_suspend_time = time.boottime_or_realtime_coarse ( ) - self.suspend_time
self.total_suspend_time = self.total_suspend_time + self.last_suspend_time
end
end
function Kindle : readyToSuspend ( )
function Kindle : readyToSuspend ( )
self.powerd : readyToSuspend ( )
self.powerd : readyToSuspend ( )
self.suspend_time = time.boottime_or_realtime_coarse ( )
end
end
function Kindle : ambientBrightnessLevel ( )
function Kindle : ambientBrightnessLevel ( )