Warn if restoring charger status fails at exit
This commit is contained in:
parent
0cb9551c3a
commit
fa5b0cd9e7
2 changed files with 6 additions and 4 deletions
|
@ -218,7 +218,9 @@ void Battery::shutdown() {
|
||||||
notifyTimer->stop();
|
notifyTimer->stop();
|
||||||
qDebug() << "Notification stopped";
|
qDebug() << "Notification stopped";
|
||||||
}
|
}
|
||||||
setChargingEnabled(true);
|
if(!setChargingEnabled(true)) {
|
||||||
chargingEnabledFile->setPermissions(originalPerms);
|
qWarning() << "ERROR! Could not restore charger status! Your device" << endl
|
||||||
qDebug() << "Charger control file permissions restored.";
|
<< "may not start until reboot! If that doesn't help," << endl
|
||||||
|
<< "uninstall Battery Buddy and reboot your device.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
QString getState();
|
QString getState();
|
||||||
|
|
||||||
bool getChargingEnabled();
|
bool getChargingEnabled();
|
||||||
void setChargingEnabled(bool);
|
bool setChargingEnabled(bool);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateData();
|
void updateData();
|
||||||
|
|
Loading…
Reference in a new issue