aboutsummaryrefslogtreecommitdiff
path: root/android/olm-sdk/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'android/olm-sdk/src/main')
-rw-r--r--android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java17
-rw-r--r--android/olm-sdk/src/main/jni/Android.mk8
2 files changed, 17 insertions, 8 deletions
diff --git a/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java b/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java
index c1e6031..cd33a5a 100644
--- a/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java
+++ b/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java
@@ -43,17 +43,26 @@ public class OlmManager {
/**
* Provide the android library version
- * @param context the context
* @return the library version
*/
- public String getSdkOlmVersion(Context context) {
+ public String getVersion() {
+ return BuildConfig.VERSION_NAME;
+ }
+
+ /**
+ * Provide a detailed version.
+ * It contains the android and the native libraries versions.
+ * @param context the context
+ * @return the detailed version
+ */
+ public String getDetailedVersion(Context context) {
String gitVersion = context.getResources().getString(R.string.git_olm_revision);
String date = context.getResources().getString(R.string.git_olm_revision_date);
- return gitVersion + "-" + date;
+ return getVersion() + " - olm version (" + getOlmLibVersion() + ") - " + gitVersion + "-" + date;
}
/**
- * Get the OLM lib version.
+ * Provide the native OLM lib version.
* @return the lib version as a string
*/
public String getOlmLibVersion(){
diff --git a/android/olm-sdk/src/main/jni/Android.mk b/android/olm-sdk/src/main/jni/Android.mk
index 97d747c..c51553c 100644
--- a/android/olm-sdk/src/main/jni/Android.mk
+++ b/android/olm-sdk/src/main/jni/Android.mk
@@ -1,11 +1,11 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE := olm
-MAJOR := 2
-MINOR := 0
-PATCH := 0
+include ../../../../common.mk
OLM_VERSION := $(MAJOR).$(MINOR).$(PATCH)
+
+LOCAL_MODULE := olm
+
SRC_ROOT_DIR := ../../../../..
$(info LOCAL_PATH=$(LOCAL_PATH))