|
|
- function _检测屏幕是否亮屏()
- import('com.nx.assist.lua.LuaEngine')
- local context = LuaEngine.getContext()
- local thisServer = context.getSystemService(context.POWER_SERVICE)
- local isOn = false
- xpcall(function()
- if thisServer.isScreenOn()then isOn = true; end
- end,function()
- if thisServer.isInteractive() then isOn = true; end
- end)
- return isOn
- end
复制代码
|
|