Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wade
DnsChanger
Commits
dc9fda67
Commit
dc9fda67
authored
Apr 14, 2018
by
Daniel Wolf
Browse files
Merge branch 'master' into release
parents
e2a83e51
ac8bf2e0
Changes
8
Show whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/dnschanger/DNSChanger.java
View file @
dc9fda67
...
...
@@ -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
...
...
app/src/main/java/com/frostnerd/dnschanger/database/DatabaseHelper.java
View file @
dc9fda67
...
...
@@ -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
);
...
...
app/src/main/res/layout/dialog_create_dns_entry.xml
View file @
dc9fda67
...
...
@@ -25,7 +25,7 @@
android:layout_height=
"wrap_content"
android:hint=
"@string/hint_dns_entry_name"
android:imeOptions=
"actionNext"
android:inputType=
"text"
android:inputType=
"text
NoSuggestions
"
android:maxLines=
"1"
android:nextFocusDown=
"@+id/dns1"
android:nextFocusForward=
"@+id/dns1"
...
...
app/src/main/res/layout/dialog_new_rule.xml
View file @
dc9fda67
...
...
@@ -30,7 +30,7 @@
android:layout_height=
"wrap_content"
android:hint=
"@string/host"
android:imeOptions=
"actionNext"
android:inputType=
"text"
android:inputType=
"text
NoSuggestions
"
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=
"text
NoSuggestions
"
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=
"text
NoSuggestions
"
android:nextFocusDown=
"@+id/dns2"
android:nextFocusForward=
"@+id/dns2"
android:text=
"::1"
...
...
app/src/main/res/layout/dialog_rule_filter.xml
View file @
dc9fda67
...
...
@@ -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=
"text
NoSuggestions
"
android:textColor=
"#FFF"
/>
</com.frostnerd.utils.design.MaterialEditText>
...
...
app/src/main/res/layout/fragment_dnsquery.xml
View file @
dc9fda67
...
...
@@ -26,7 +26,7 @@
android:layout_height=
"wrap_content"
android:hint=
"@string/hint_dns_lookup"
android:text=
"google.com"
android:inputType=
"text"
android:inputType=
"text
NoSuggestions
"
android:textColor=
"#FFF"
/>
</com.frostnerd.utils.design.MaterialEditText>
...
...
app/src/main/res/layout/tasker_configure_layout.xml
View file @
dc9fda67
...
...
@@ -45,7 +45,7 @@
android:layout_height=
"wrap_content"
android:hint=
"@string/hint_dns_entry_name"
android:imeOptions=
"actionNext"
android:inputType=
"text"
android:inputType=
"text
NoSuggestions
"
android:maxLines=
"1"
android:nextFocusDown=
"@id/dns1"
android:nextFocusForward=
"@id/dns1"
...
...
app/src/main/res/xml/advanced_preferences.xml
View file @
dc9fda67
...
...
@@ -39,7 +39,7 @@
<EditTextPreference
android:defaultValue=
"500"
android:dependency=
"dns_over_tcp"
android:inputType=
"number
Decimal
"
android:inputType=
"number"
android:key=
"tcp_timeout"
android:summary=
"@string/summary_tcp_timeout"
android:title=
"@string/title_tcp_timeout"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment