mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Android: print Android HW information
This uses Android methods through JNI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
947b091553
commit
cf4dbbe5f2
2 changed files with 12 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue