mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Stopped battery warning when plugged
Change-Id: Id4f0d5d730c6045bf69cfadd724dc8ad819494d5
This commit is contained in:
committed by
Émilie Feral
parent
735fc6e1bb
commit
41cf0aaac6
@@ -290,7 +290,7 @@ void AppsContainer::shutdownDueToLowBattery() {
|
||||
* case. */
|
||||
return;
|
||||
}
|
||||
while (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
|
||||
while (Ion::Battery::level() == Ion::Battery::Charge::EMPTY && !Ion::USB::isPlugged()) {
|
||||
Ion::Backlight::setBrightness(0);
|
||||
if (!GlobalPreferences::sharedGlobalPreferences()->isInExamMode()) {
|
||||
/* Unless the LED is lit up for the exam mode, switch off the LED. IF the
|
||||
|
||||
@@ -9,7 +9,7 @@ BatteryTimer::BatteryTimer() :
|
||||
bool BatteryTimer::fire() {
|
||||
AppsContainer * container = AppsContainer::sharedAppsContainer();
|
||||
bool needRedrawing = container->updateBatteryState();
|
||||
if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
|
||||
if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY && !Ion::USB::isPlugged()) {
|
||||
container->shutdownDueToLowBattery();
|
||||
}
|
||||
return needRedrawing;
|
||||
|
||||
Reference in New Issue
Block a user