Skip to content

Commit

Permalink
added githash to build information
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterHasse committed Nov 6, 2024
1 parent f5fc323 commit 20aadaa
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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();
Expand All @@ -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());
}
Expand All @@ -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;
}

Expand Down

0 comments on commit 20aadaa

Please sign in to comment.