UIManager: Give more time to the kernel to figure out if we're actually

plugged in...
reviewable/pr8766/r1
NiLuJe 2 years ago
parent 0408816a54
commit 035b24bb81

@ -1764,14 +1764,14 @@ end
-- The common operations that should be performed when the device is plugged to a power source.
function UIManager:_beforeCharging()
-- Leave the kernel some time to figure it out ;o).
self:scheduleIn(0.5, function() Device:setupChargingLED() end)
self:scheduleIn(1, function() Device:setupChargingLED() end)
self:broadcastEvent(Event:new("Charging"))
end
-- The common operations that should be performed when the device is unplugged from a power source.
function UIManager:_afterNotCharging()
-- Leave the kernel some time to figure it out ;o).
self:scheduleIn(0.5, function() Device:setupChargingLED() end)
self:scheduleIn(1, function() Device:setupChargingLED() end)
self:broadcastEvent(Event:new("NotCharging"))
end

Loading…
Cancel
Save