diff options
-rw-r--r-- | core/android.cpp | 8 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/core/android.cpp b/core/android.cpp index 0ef1219fd..a58da2ead 100644 --- a/core/android.cpp +++ b/core/android.cpp @@ -253,3 +253,11 @@ void checkPendingIntents() } qDebug() << "checkPendingIntents: Activity not valid"; } + +QString getAndroidHWInfo() +{ + return QStringLiteral("%1/%2/%3") + .arg(QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "MODEL").toString()) + .arg(QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "BRAND").toString()) + .arg(QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "PRODUCT").toString()); +} diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index b92e4f081..56eecd2cd 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -205,6 +205,10 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), git_libgit2_version(&git_maj, &git_min, &git_rev); appendTextToLog(QStringLiteral("built with libgit2 %1.%2.%3").arg(git_maj).arg(git_min).arg(git_rev)); appendTextToLog(QStringLiteral("Running on %1").arg(QSysInfo::prettyProductName())); +#if defined(Q_OS_ANDROID) + extern QString getAndroidHWInfo(); + appendTextToLog(getAndroidHWInfo()); +#endif setStartPageText(tr("Starting...")); LOG_STP("qmlmgr start page"); |