From 724d9ea20b938630b81bbdfe5d0ce36d86cbd09e Mon Sep 17 00:00:00 2001 From: pedroGitt Date: Thu, 27 Oct 2016 18:47:14 +0200 Subject: Add new API to provide the SDK version --- .../src/androidTest/java/org/matrix/olm/OlmAccountTest.java | 8 +++++--- .../olm-sdk/src/main/java/org/matrix/olm/OlmManager.java | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'java/android/OlmLibSdk') diff --git a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java index a5cde5e..3b6101b 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java +++ b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java @@ -62,9 +62,11 @@ public class OlmAccountTest { // load native lib mOlmManager = new OlmManager(); - String version = mOlmManager.getOlmLibVersion(); - assertNotNull(version); - Log.d(LOG_TAG, "## setUpClass(): lib version="+version); + String olmLibVersion = mOlmManager.getOlmLibVersion(); + assertNotNull(olmLibVersion); + String olmSdkVersion = mOlmManager.getSdkOlmVersion(); + assertNotNull(olmLibVersion); + Log.d(LOG_TAG, "## setUpClass(): Versions - Android Olm SDK = "+olmSdkVersion+" Olm lib ="+olmLibVersion); } @AfterClass diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java index 21734dc..92fbe2b 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java +++ b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java @@ -24,6 +24,7 @@ import android.util.Log; */ public class OlmManager { private static final String LOG_TAG = "OlmManager"; + private static final String SDK_OLM_VERSION = "V0.1.0_1"; static { try { @@ -33,6 +34,12 @@ public class OlmManager { } } + public String getSdkOlmVersion() { + //Date currentDate = Calendar.getInstance().getTime(); + //String retVal = new SimpleDateFormat("yyyyMMdd_HH:mm:ss").format(currentDate); + return SDK_OLM_VERSION; + } + /** * Get the OLM lib version. * @return the lib version as a string -- cgit v1.2.3