From 737a41f45b55a4a1a83a509b1e1ee295071bf11e Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sat, 27 Feb 2016 17:02:38 +0100 Subject: [PATCH] display error message --- app/src/main/java/org/schabi/newpipe/ErrorActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java index 594026f7a..be84019f8 100644 --- a/app/src/main/java/org/schabi/newpipe/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/ErrorActivity.java @@ -22,6 +22,7 @@ import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; +import android.widget.Toast; import org.apache.commons.lang.exception.ExceptionUtils; import org.json.JSONArray; @@ -94,6 +95,7 @@ public class ErrorActivity extends AppCompatActivity { public static void reportError(final Context context, final List el, final Class returnAcitivty, View rootView, final ErrorInfo errorInfo) { + if (rootView != null) { Snackbar.make(rootView, R.string.error_snackbar_message, Snackbar.LENGTH_LONG) .setAction(R.string.error_snackbar_action, new View.OnClickListener() { @@ -181,6 +183,9 @@ public class ErrorActivity extends AppCompatActivity { globIpRangeThread = new Thread(new IpRagneRequester()); globIpRangeThread.start(); + + Toast.makeText(this, + errorInfo.message, Toast.LENGTH_LONG).show(); } @Override