Commit dde3e352 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't show the error dialog for anything anymore

parent d58751bf
package com.frostnerd.dnschanger; package com.frostnerd.dnschanger;
import android.app.Application; import android.app.Application;
import android.database.sqlite.SQLiteException;
import com.frostnerd.dnschanger.activities.ErrorDialogActivity; import com.frostnerd.dnschanger.activities.ErrorDialogActivity;
import com.frostnerd.dnschanger.util.ThemeHandler; import com.frostnerd.dnschanger.util.ThemeHandler;
...@@ -31,8 +32,8 @@ public class DNSChanger extends Application { ...@@ -31,8 +32,8 @@ public class DNSChanger extends Application {
private Thread.UncaughtExceptionHandler defaultHandler; private Thread.UncaughtExceptionHandler defaultHandler;
private boolean showErrorDialog(Throwable exception) { private boolean showErrorDialog(Throwable exception) {
return true; if(exception instanceof SQLiteException || (exception.getCause() != null && exception instanceof SQLiteException))return true;
//return exception.getMessage() != null && exception.getMessage().toLowerCase().contains("cannot create interface"); return exception.getMessage() != null && exception.getMessage().toLowerCase().contains("cannot create interface");
} }
@Override @Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment