mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Merge branch 'decouple-report-sender' into 'master'
Decouple DevReportSender from TorPlugin See merge request akwizgran/briar!803
This commit is contained in:
@@ -14,6 +14,7 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.bramble.api.reporting.DevConfig;
|
||||
import org.briarproject.bramble.api.ui.UiCallback;
|
||||
import org.briarproject.bramble.util.AndroidUtils;
|
||||
import org.briarproject.bramble.util.StringUtils;
|
||||
import org.briarproject.briar.api.android.AndroidNotificationManager;
|
||||
import org.briarproject.briar.api.android.DozeWatchdog;
|
||||
@@ -96,7 +97,7 @@ public class AppModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DevConfig provideDevConfig(CryptoComponent crypto) {
|
||||
DevConfig provideDevConfig(Application app, CryptoComponent crypto) {
|
||||
@NotNullByDefault
|
||||
DevConfig devConfig = new DevConfig() {
|
||||
|
||||
@@ -114,6 +115,11 @@ public class AppModule {
|
||||
public String getDevOnionAddress() {
|
||||
return DEV_ONION_ADDRESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getReportDir() {
|
||||
return AndroidUtils.getReportDir(app.getApplicationContext());
|
||||
}
|
||||
};
|
||||
return devConfig;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ 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;
|
||||
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;
|
||||
@@ -37,7 +37,7 @@ public class BriarReportSender implements ReportSender {
|
||||
String crashReport;
|
||||
try {
|
||||
crashReport = errorContent.toJSON().toString();
|
||||
} catch (JSONReportBuilder.JSONReportException e) {
|
||||
} catch (JSONReportException e) {
|
||||
throw new ReportSenderException("Couldn't create JSON", e);
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user