Commit dc9fda67 authored by Daniel Wolf's avatar Daniel Wolf

Merge branch 'master' into release

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