Move kobo auto-suspension logic out of UIManager (#2933)

This commit is contained in:
Hzj_jie
2017-06-23 10:04:11 -07:00
committed by GitHub
parent c8be27481c
commit 7d2ed4c3d0
16 changed files with 494 additions and 127 deletions

View File

@@ -47,7 +47,10 @@ function Dbg:turnOn()
return unpack(values)
end
end
Dbg.dassert = function(check, msg) assert(check, msg) end
Dbg.dassert = function(check, msg)
assert(check, msg)
return check
end
-- TODO: close ev.log fd for children
-- create or clear ev log file
@@ -60,7 +63,9 @@ function Dbg:turnOff()
logger:setLevel(logger.levels.info)
function Dbg_mt.__call() end
function Dbg.guard() end
function Dbg.dassert() end
Dbg.dassert = function(check)
return check
end
if self.ev_log then
io.close(self.ev_log)
self.ev_log = nil