Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
briar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julian Dehm
briar
Commits
b972d1fc
Verified
Commit
b972d1fc
authored
Sep 26, 2018
by
akwizgran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ACRA usage for new version.
parent
ccbeee60
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
briar-android/src/main/java/org/briarproject/briar/android/reporting/BriarReportSender.java
...iarproject/briar/android/reporting/BriarReportSender.java
+1
-7
briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java
...iarproject/briar/android/reporting/DevReportActivity.java
+9
-6
No files found.
briar-android/src/main/java/org/briarproject/briar/android/reporting/BriarReportSender.java
View file @
b972d1fc
...
...
@@ -6,7 +6,6 @@ import android.support.annotation.NonNull;
import
org.acra.collector.CrashReportData
;
import
org.acra.sender.ReportSender
;
import
org.acra.sender.ReportSenderException
;
import
org.acra.util.JSONReportBuilder.JSONReportException
;
import
org.briarproject.bramble.api.reporting.DevReporter
;
import
org.briarproject.bramble.util.AndroidUtils
;
import
org.briarproject.briar.android.AndroidComponent
;
...
...
@@ -34,12 +33,7 @@ public class BriarReportSender implements ReportSender {
@NonNull
CrashReportData
errorContent
)
throws
ReportSenderException
{
component
.
inject
(
this
);
String
crashReport
;
try
{
crashReport
=
errorContent
.
toJSON
().
toString
();
}
catch
(
JSONReportException
e
)
{
throw
new
ReportSenderException
(
"Couldn't create JSON"
,
e
);
}
String
crashReport
=
errorContent
.
toJSON
().
toString
();
try
{
File
reportDir
=
AndroidUtils
.
getReportDir
(
ctx
);
String
reportId
=
errorContent
.
getProperty
(
REPORT_ID
);
...
...
briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java
View file @
b972d1fc
...
...
@@ -24,9 +24,11 @@ import org.acra.ReportField;
import
org.acra.collector.CrashReportData
;
import
org.acra.dialog.BaseCrashReportDialog
;
import
org.acra.file.CrashReportPersister
;
import
org.acra.model.Element
;
import
org.briarproject.briar.R
;
import
org.briarproject.briar.android.Localizer
;
import
org.briarproject.briar.android.util.UserFeedback
;
import
org.json.JSONException
;
import
java.io.File
;
import
java.io.IOException
;
...
...
@@ -282,7 +284,7 @@ public class DevReportActivity extends BaseCrashReportDialog
CrashReportPersister
persister
=
new
CrashReportPersister
();
try
{
return
persister
.
load
(
reportFile
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
|
JSONException
e
)
{
LOG
.
log
(
WARNING
,
"Could not load report file"
,
e
);
return
null
;
}
...
...
@@ -292,9 +294,10 @@ public class DevReportActivity extends BaseCrashReportDialog
protected
void
onPostExecute
(
CrashReportData
crashData
)
{
LayoutInflater
inflater
=
getLayoutInflater
();
if
(
crashData
!=
null
)
{
for
(
Entry
<
ReportField
,
String
>
e
:
crashData
.
entrySet
())
{
for
(
Entry
<
ReportField
,
Element
>
e
:
crashData
.
entrySet
())
{
ReportField
field
=
e
.
getKey
();
String
value
=
e
.
getValue
().
replaceAll
(
"\\\\n"
,
"\n"
);
String
value
=
e
.
getValue
().
toString
()
.
replaceAll
(
"\\\\n"
,
"\n"
);
boolean
required
=
requiredFields
.
contains
(
field
);
boolean
excluded
=
excludedFields
.
contains
(
field
);
View
v
=
inflater
.
inflate
(
R
.
layout
.
list_item_crash
,
...
...
@@ -343,10 +346,10 @@ public class DevReportActivity extends BaseCrashReportDialog
data
.
remove
(
field
);
}
}
else
{
Iterator
<
Entry
<
ReportField
,
String
>>
iter
=
Iterator
<
Entry
<
ReportField
,
Element
>>
iter
=
data
.
entrySet
().
iterator
();
while
(
iter
.
hasNext
())
{
Entry
<
ReportField
,
String
>
e
=
iter
.
next
();
Entry
<
ReportField
,
Element
>
e
=
iter
.
next
();
if
(!
requiredFields
.
contains
(
e
.
getKey
()))
{
iter
.
remove
();
}
...
...
@@ -354,7 +357,7 @@ public class DevReportActivity extends BaseCrashReportDialog
}
persister
.
store
(
data
,
reportFile
);
return
true
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
|
JSONException
e
)
{
LOG
.
log
(
WARNING
,
"Error processing report file"
,
e
);
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment