Don't enable charging on exit when running on emulator

This commit is contained in:
Matti Viljanen 2021-04-09 23:34:06 +03:00
parent ba3d17b611
commit 0aff894dd2
No known key found for this signature in database
GPG key ID: CF32A1495158F888

View file

@ -254,7 +254,8 @@ void Battery::shutdown() {
lowNotifyTimer->stop();
qDebug() << "Low battery notification stopped";
}
if(!setChargingEnabled(true)) {
// ENABLE/DISABLE CHARGING
if(!QHostInfo::localHostName().contains("SailfishEmul") && !setChargingEnabled(true)) {
qWarning() << "ERROR! Could not restore charger status! Your device" << endl
<< "may not start until reboot! If that doesn't help," << endl
<< "uninstall Battery Buddy and reboot your device.";