From 20aadaa638e50b925c4a8978e6fc31038c77f8fe Mon Sep 17 00:00:00 2001 From: Peter Hasse Date: Wed, 6 Nov 2024 17:42:46 +0100 Subject: [PATCH] added githash to build information --- .../DataProvider/BuildInformation.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/BuildInformation.java b/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/BuildInformation.java index 28814499..2182d0fd 100644 --- a/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/BuildInformation.java +++ b/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/BuildInformation.java @@ -7,6 +7,7 @@ import org.json.JSONObject; import de.fraunhofer.fokus.OpenMobileNetworkToolkit.BuildConfig; +import de.fraunhofer.fokus.OpenMobileNetworkToolkit.R; public class BuildInformation extends Information { private final String TAG = "BuildInformation"; @@ -39,6 +40,10 @@ public boolean isDebug() { return BuildConfig.DEBUG; } + public int getGitHash() { + return R.string.git_hash; + } + public JSONObject toJSON() { JSONObject json = new JSONObject(); @@ -48,6 +53,7 @@ public JSONObject toJSON() { json.put("VersionName", getVersionName()); json.put("ApplicationId", getApplicationId()); json.put("Debug", isDebug()); + json.put("GitHash", getGitHash()); } catch (Exception e) { Log.d(TAG, e.toString()); } @@ -64,6 +70,7 @@ public Point getPoint(Point point) { point.addField("VersionName", getVersionName()); point.addField("ApplicationID", getApplicationId()); point.addField("Debug", isDebug()); + point.addField("GitHash", getGitHash()); return point; }