Add dummy charger control for SDK
This commit is contained in:
parent
9148540c96
commit
bfd9c62dcf
2 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,11 @@ Battery::Battery(Settings* newSettings, QObject* parent) : QObject(parent)
|
|||
// ENABLE/DISABLE CHARGING
|
||||
if(QHostInfo::localHostName().contains("SailfishEmul")) {
|
||||
qInfo() << "Sailfish SDK detected";
|
||||
qInfo() << "Charger control feature disabled";
|
||||
qInfo() << "Using dummy control file";
|
||||
filename = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+"/charging_enabled_dummy";
|
||||
chargingEnabledFile = new QFile(filename, this);
|
||||
enableChargingValue = 1;
|
||||
disableChargingValue = 0;
|
||||
}
|
||||
else {
|
||||
// e.g. for Sony Xperia XA2
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
#include <QHostInfo>
|
||||
#include <QDebug>
|
||||
#include "settings.h"
|
||||
|
|
Loading…
Reference in a new issue