aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2014-01-30 13:32:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-07 10:24:30 +0100
commita4dd3f81448db91b10bdfb236ac81caa8617c381 (patch)
tree1a7839c11e70849c8adbce511eb4e00030d1df24 /tests
parent2c9ca420bf3f8b32977a88e7923f18cc7557c613 (diff)
Add API to get the Android API level
The Android SDK version, or API level, is commonly used to determine what APIs are available at runtime. [ChangeLog][QtAndroidExtras] Added convenience method for getting the Android SDK version. Change-Id: Ic20322f68bc9680aec9e1c8404583462063904db Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qandroidfunctions/tst_qandroidfunctions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qandroidfunctions/tst_qandroidfunctions.cpp b/tests/auto/qandroidfunctions/tst_qandroidfunctions.cpp
index 9f6bfd9..4288b34 100644
--- a/tests/auto/qandroidfunctions/tst_qandroidfunctions.cpp
+++ b/tests/auto/qandroidfunctions/tst_qandroidfunctions.cpp
@@ -46,9 +46,15 @@ class tst_QAndroidFunctions : public QObject
{
Q_OBJECT
private slots:
+ void testAndroidSdkVersion();
void testAndroidActivity();
};
+void tst_QAndroidFunctions::testAndroidSdkVersion()
+{
+ QVERIFY(QtAndroid::androidSdkVersion() > 0);
+}
+
void tst_QAndroidFunctions::testAndroidActivity()
{
QAndroidJniObject activity = QtAndroid::androidActivity();