mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Merge branch 'upgrade-dependencies' into 'master'
Upgrade some of the things See merge request briar/briar!935
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_lock"
|
||||
android:summary="@string/panic_setting_signout_summary"
|
||||
android:title="@string/panic_setting_signout_title"/>
|
||||
android:title="@string/panic_setting_signout_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
@@ -23,7 +25,8 @@
|
||||
android:enabled="false"
|
||||
android:key="pref_key_purge"
|
||||
android:summary="@string/purge_setting_summary"
|
||||
android:title="@string/purge_setting_title"/>
|
||||
android:title="@string/purge_setting_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/display_settings_title">
|
||||
@@ -10,7 +11,8 @@
|
||||
android:entryValues="@array/pref_language_values"
|
||||
android:key="pref_key_language"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_language_title"/>
|
||||
android:title="@string/pref_language_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_theme_light_value"
|
||||
@@ -18,8 +20,9 @@
|
||||
android:entryValues="@array/pref_theme_values"
|
||||
android:key="pref_key_theme"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_theme_title"/>
|
||||
|
||||
android:title="@string/pref_theme_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -33,7 +36,8 @@
|
||||
android:key="pref_key_bluetooth"
|
||||
android:persistent="false"
|
||||
android:summary="%s"
|
||||
android:title="@string/bluetooth_setting"/>
|
||||
android:title="@string/bluetooth_setting"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
@@ -42,14 +46,16 @@
|
||||
android:key="pref_key_tor_network"
|
||||
android:persistent="false"
|
||||
android:summary="%s"
|
||||
android:title="@string/tor_network_setting"/>
|
||||
android:title="@string/tor_network_setting"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_tor_mobile_data"
|
||||
android:persistent="false"
|
||||
android:title="@string/tor_mobile_data_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
@@ -63,7 +69,8 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_summary"
|
||||
android:title="@string/pref_lock_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_lock_timeout_value_default"
|
||||
@@ -73,11 +80,13 @@
|
||||
android:key="pref_key_lock_timeout"
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_timeout_summary"
|
||||
android:title="@string/pref_lock_timeout_title"/>
|
||||
android:title="@string/pref_lock_timeout_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_change_password"
|
||||
android:title="@string/change_password">
|
||||
android:title="@string/change_password"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.login.ChangePasswordActivity"
|
||||
@@ -92,7 +101,8 @@
|
||||
|
||||
<Preference
|
||||
android:summary="@string/panic_setting_hint"
|
||||
android:title="@string/panic_setting">
|
||||
android:title="@string/panic_setting"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.panic.PanicPreferencesActivity"
|
||||
@@ -111,7 +121,8 @@
|
||||
android:key="pref_key_notify_sign_in"
|
||||
android:summary="@string/notify_sign_in_summary"
|
||||
android:title="@string/notify_sign_in_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -119,7 +130,8 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/notify_private_messages_setting_summary"
|
||||
android:title="@string/notify_private_messages_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -127,7 +139,8 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/notify_group_messages_setting_summary"
|
||||
android:title="@string/notify_group_messages_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -135,7 +148,8 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/notify_forum_posts_setting_summary"
|
||||
android:title="@string/notify_forum_posts_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -143,28 +157,34 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/notify_blog_posts_setting_summary"
|
||||
android:title="@string/notify_blog_posts_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_notify_vibration"
|
||||
android:persistent="false"
|
||||
android:title="@string/notify_vibration_setting"
|
||||
android:widgetLayout="@layout/preference_switch_compat"/>
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_notify_sound"
|
||||
android:title="@string/notify_sound_setting"/>
|
||||
android:title="@string/notify_sound_setting"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/feedback_settings_title"/>
|
||||
android:title="@string/feedback_settings_title">
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_send_feedback"
|
||||
android:title="@string/send_feedback"/>
|
||||
<Preference
|
||||
android:key="pref_key_send_feedback"
|
||||
android:title="@string/send_feedback"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
@@ -172,7 +192,8 @@
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_test_data"
|
||||
android:title="Create Test Data">
|
||||
android:title="Create Test Data"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.test.TestDataActivity"
|
||||
@@ -181,7 +202,8 @@
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_explode"
|
||||
android:title="Crash"/>
|
||||
android:title="Crash"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user