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

Merge branch 'master' into release

parents e2a83e51 ac8bf2e0
...@@ -21,16 +21,18 @@ public class DNSChanger extends Application { ...@@ -21,16 +21,18 @@ public class DNSChanger extends Application {
public void uncaughtException(Thread t, Throwable e) { public void uncaughtException(Thread t, Throwable e) {
LogFactory.writeMessage(DNSChanger.this, new String[]{LOG_TAG, LogFactory.Tag.ERROR.toString()}, "Caught uncaught exception"); LogFactory.writeMessage(DNSChanger.this, new String[]{LOG_TAG, LogFactory.Tag.ERROR.toString()}, "Caught uncaught exception");
LogFactory.writeStackTrace(DNSChanger.this, new String[]{LOG_TAG, LogFactory.Tag.ERROR.toString()}, e); LogFactory.writeStackTrace(DNSChanger.this, new String[]{LOG_TAG, LogFactory.Tag.ERROR.toString()}, e);
if (defaultHandler != null) defaultHandler.uncaughtException(t, e);
if (showErrorDialog(e)) { if (showErrorDialog(e)) {
ErrorDialogActivity.show(DNSChanger.this, e); ErrorDialogActivity.show(DNSChanger.this, e);
System.exit(2); System.exit(2);
} else if (defaultHandler != null) defaultHandler.uncaughtException(t, e); }
} }
}; };
private Thread.UncaughtExceptionHandler defaultHandler; private Thread.UncaughtExceptionHandler defaultHandler;
private boolean showErrorDialog(Throwable exception) { private boolean showErrorDialog(Throwable exception) {
return exception.getMessage() != null && exception.getMessage().toLowerCase().contains("cannot create interface"); return true;
//return exception.getMessage() != null && exception.getMessage().toLowerCase().contains("cannot create interface");
} }
@Override @Override
......
...@@ -107,8 +107,9 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper ...@@ -107,8 +107,9 @@ public class DatabaseHelper extends com.frostnerd.utils.database.DatabaseHelper
} }
cursor.close(); cursor.close();
} }
db.execSQL("DROP TABLE IF EXISTS Shortcuts"); for(String s: getTableNames(db)){
db.execSQL("DROP TABLE IF EXISTS DNSEntries"); db.execSQL("DROP TABLE IF EXISTS " + s);
}
onCreate(db); onCreate(db);
for(DNSEntry entry: entries) insert(entry); for(DNSEntry entry: entries) insert(entry);
for(Shortcut shortcut: shortcuts) createShortcut(shortcut); for(Shortcut shortcut: shortcuts) createShortcut(shortcut);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/hint_dns_entry_name" android:hint="@string/hint_dns_entry_name"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="text" android:inputType="textNoSuggestions"
android:maxLines="1" android:maxLines="1"
android:nextFocusDown="@+id/dns1" android:nextFocusDown="@+id/dns1"
android:nextFocusForward="@+id/dns1" android:nextFocusForward="@+id/dns1"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/host" android:hint="@string/host"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="text" android:inputType="textNoSuggestions"
android:nextFocusDown="@+id/target" android:nextFocusDown="@+id/target"
android:nextFocusForward="@+id/target" android:nextFocusForward="@+id/target"
android:text="example.com" android:text="example.com"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="IPv4" android:hint="IPv4"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="text" android:inputType="textNoSuggestions"
android:nextFocusDown="@+id/target2" android:nextFocusDown="@+id/target2"
android:nextFocusForward="@+id/target2" android:nextFocusForward="@+id/target2"
android:text="127.0.0.1" android:text="127.0.0.1"
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="IPv6" android:hint="IPv6"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="text" android:inputType="textNoSuggestions"
android:nextFocusDown="@+id/dns2" android:nextFocusDown="@+id/dns2"
android:nextFocusForward="@+id/dns2" android:nextFocusForward="@+id/dns2"
android:text="::1" android:text="::1"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/search_by_target" android:hint="@string/search_by_target"
android:inputType="text" android:inputType="textNoSuggestions"
android:textColor="#FFF"/> android:textColor="#FFF"/>
</com.frostnerd.utils.design.MaterialEditText> </com.frostnerd.utils.design.MaterialEditText>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/hint_dns_lookup" android:hint="@string/hint_dns_lookup"
android:text="google.com" android:text="google.com"
android:inputType="text" android:inputType="textNoSuggestions"
android:textColor="#FFF" /> android:textColor="#FFF" />
</com.frostnerd.utils.design.MaterialEditText> </com.frostnerd.utils.design.MaterialEditText>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/hint_dns_entry_name" android:hint="@string/hint_dns_entry_name"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="text" android:inputType="textNoSuggestions"
android:maxLines="1" android:maxLines="1"
android:nextFocusDown="@id/dns1" android:nextFocusDown="@id/dns1"
android:nextFocusForward="@id/dns1" android:nextFocusForward="@id/dns1"
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<EditTextPreference <EditTextPreference
android:defaultValue="500" android:defaultValue="500"
android:dependency="dns_over_tcp" android:dependency="dns_over_tcp"
android:inputType="numberDecimal" android:inputType="number"
android:key="tcp_timeout" android:key="tcp_timeout"
android:summary="@string/summary_tcp_timeout" android:summary="@string/summary_tcp_timeout"
android:title="@string/title_tcp_timeout" /> android:title="@string/title_tcp_timeout" />
......
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