From 2e8d566bd42ac747ad276eb5e328ee2303c48c26 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 15 Dec 2018 14:45:14 -0600 Subject: Clean up error messages Signed-off-by: Jason A. Donenfeld --- .../com/wireguard/android/preference/LogExporterPreference.java | 6 +++--- .../com/wireguard/android/preference/ZipExporterPreference.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/src/main/java/com/wireguard/android/preference') diff --git a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java index 3836f9ac..3f59c7f8 100644 --- a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java @@ -17,7 +17,7 @@ import android.util.Log; import com.wireguard.android.Application; import com.wireguard.android.R; -import com.wireguard.android.util.ExceptionLoggers; +import com.wireguard.android.util.ErrorMessages; import com.wireguard.android.util.FragmentUtils; import java.io.BufferedReader; @@ -76,7 +76,7 @@ public class LogExporterPreference extends Preference { private void exportLogComplete(final String filePath, @Nullable final Throwable throwable) { if (throwable != null) { - final String error = ExceptionLoggers.unwrapMessage(throwable); + final String error = ErrorMessages.get(throwable); final String message = getContext().getString(R.string.log_export_error, error); Log.e(TAG, message, throwable); Snackbar.make( @@ -98,7 +98,7 @@ public class LogExporterPreference extends Preference { @Override public CharSequence getTitle() { - return getContext().getString(R.string.log_exporter_title); + return getContext().getString(R.string.log_export_title); } @Override diff --git a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java index f5385a2b..a2646053 100644 --- a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java @@ -18,7 +18,7 @@ import android.util.Log; import com.wireguard.android.Application; import com.wireguard.android.R; import com.wireguard.android.model.Tunnel; -import com.wireguard.android.util.ExceptionLoggers; +import com.wireguard.android.util.ErrorMessages; import com.wireguard.android.util.FragmentUtils; import com.wireguard.config.Config; @@ -86,7 +86,7 @@ public class ZipExporterPreference extends Preference { private void exportZipComplete(@Nullable final String filePath, @Nullable final Throwable throwable) { if (throwable != null) { - final String error = ExceptionLoggers.unwrapMessage(throwable); + final String error = ErrorMessages.get(throwable); final String message = getContext().getString(R.string.zip_export_error, error); Log.e(TAG, message, throwable); Snackbar.make( @@ -108,7 +108,7 @@ public class ZipExporterPreference extends Preference { @Override public CharSequence getTitle() { - return getContext().getString(R.string.zip_exporter_title); + return getContext().getString(R.string.zip_export_title); } @Override -- cgit v1.2.3