aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-18 13:35:22 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-21 15:13:10 -0700
commitcf4dbbe5f2def7a6666e74518a5cfea668ded569 (patch)
tree8db81f6fcbd23c48f79dd5898d5957d2ea229073 /core
parent947b0915538aca5bb1e0735796be78f16cabf3b5 (diff)
downloadsubsurface-cf4dbbe5f2def7a6666e74518a5cfea668ded569.tar.gz
Android: print Android HW information
This uses Android methods through JNI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/android.cpp8
1 files changed, 8 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());
+}