Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
1c6be2fb
Verified
Commit
1c6be2fb
authored
8 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Include Commit ID in crash reports and feedback
parent
e7a26c42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
briar-android/build.gradle
+14
-0
14 additions, 0 deletions
briar-android/build.gradle
briar-android/src/main/java/org/briarproject/briar/android/reporting/BriarReportPrimer.java
+4
-0
4 additions, 0 deletions
...iarproject/briar/android/reporting/BriarReportPrimer.java
with
18 additions
and
0 deletions
briar-android/build.gradle
+
14
−
0
View file @
1c6be2fb
...
...
@@ -62,6 +62,19 @@ dependencyVerification {
]
}
def
getGitHash
=
{
->
def
stdout
=
new
ByteArrayOutputStream
()
try
{
exec
{
commandLine
'git'
,
'rev-parse'
,
'--short'
,
'HEAD'
standardOutput
=
stdout
}
return
stdout
.
toString
().
trim
()
}
catch
(
Exception
ignored
)
{
return
"No commit hash"
}
}
android
{
compileSdkVersion
23
buildToolsVersion
"23.0.3"
...
...
@@ -70,6 +83,7 @@ android {
minSdkVersion
14
targetSdkVersion
22
resValue
"string"
,
"app_package"
,
"org.briarproject.briar"
buildConfigField
"String"
,
"GitHash"
,
"\"${getGitHash()}\""
}
buildTypes
{
...
...
This diff is collapsed.
Click to expand it.
briar-android/src/main/java/org/briarproject/briar/android/reporting/BriarReportPrimer.java
+
4
−
0
View file @
1c6be2fb
...
...
@@ -17,6 +17,7 @@ import android.support.annotation.NonNull;
import
org.acra.builder.ReportBuilder
;
import
org.acra.builder.ReportPrimer
;
import
org.briarproject.bramble.util.StringUtils
;
import
org.briarproject.briar.BuildConfig
;
import
java.io.File
;
import
java.lang.reflect.InvocationTargetException
;
...
...
@@ -213,6 +214,9 @@ public class BriarReportPrimer implements ReportPrimer {
customData
.
put
(
"Bluetooth address from settings"
,
scrubMacAddress
(
btSettingsAddr
));
// Git commit ID
customData
.
put
(
"Commit ID"
,
BuildConfig
.
GitHash
);
return
Collections
.
unmodifiableMap
(
customData
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment