Skip to content

Commit

Permalink
try to fix crash when resume
Browse files Browse the repository at this point in the history
  • Loading branch information
glzjin committed Aug 7, 2016
1 parent 9862fd8 commit cf82225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
.setSession(profile.name)
.setMtu(VPN_MTU)
.addAddress(PRIVATE_VLAN.formatLocal(Locale.ENGLISH, "1"), 24)
.addDnsServer(profile.dns.split(":")(2))
.addDnsServer(profile.dns.split(":")(0))

if (profile.ipv6) {
builder.addAddress(PRIVATE_VLAN6.formatLocal(Locale.ENGLISH, "1"), 126)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ class SummaryEditTextPreference(context: Context, attrs: AttributeSet, defStyle:
}

override def setText(text: String) {
super.setText(text)
setSummary(text)
if(text != null)
{
super.setText(text)
setSummary(text)
}
}

override def setSummary(summary: CharSequence) {
Expand Down

0 comments on commit cf82225

Please sign in to comment.