Commit 66f88138 authored by sage's avatar sage

Merge branch 'jb41408' into 'master'

Jb41408

See merge request !47
parents acbd5676 60d02f57
*.o
Makefile
moc_*
RPMS/
documentation.list
src/connmanvpnconnectionproxy.cpp
src/connmanvpnconnectionproxy.h
src/connmanvpnproxy.cpp
src/connmanvpnproxy.h
src/libsystemsettings.prl
*.so*
src/mceiface.cpp
src/mceiface.h
src/pkgconfig/
src/plugin/libnemosystemsettings.so
src/plugin/plugin.moc
tests/tests.xml
tests/ut_diskusage
......@@ -164,18 +164,23 @@ QString AboutSettings::imei() const
QString AboutSettings::serial() const
{
// XXX: For now, this is specific to the Jolla Tablet; eventually we should
// use QDeviceInfo's uniqueDeviceID(), but that does not always return the
// serial number, so this is our best bet for the short term (this will not
// show any serial number on the Phone, there we have the IMEI instead).
QFile serial_txt("/config/serial/serial.txt");
if (serial_txt.exists()) {
serial_txt.open(QIODevice::ReadOnly);
return QString::fromUtf8(serial_txt.readAll()).trimmed();
} else {
return "";
// TODO: eventually we should use QDeviceInfo's uniqueDeviceID()
QStringList serialFiles;
serialFiles
// This file is specific to the Jolla Tablet;
<< "/config/serial/serial.txt"
// Some devices have serialno in this path.
<< "/sys/firmware/devicetree/base/firmware/android/serialno";
for (const QString &serialFile : serialFiles) {
QFile serialTxt(serialFile);
if (serialTxt.exists() && serialTxt.open(QIODevice::ReadOnly))
return QString::fromUtf8(serialTxt.readAll()).trimmed();
}
return QString();
}
QString AboutSettings::operatingSystemName() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment