Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
4c1a817c
Commit
4c1a817c
authored
Mar 11, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a crash on Android N preview
parent
390d79c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala
...in/scala/com/github/shadowsocks/ShadowsocksSettings.scala
+2
-8
No files found.
src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala
View file @
4c1a817c
...
@@ -15,7 +15,7 @@ import android.webkit.{WebView, WebViewClient}
...
@@ -15,7 +15,7 @@ import android.webkit.{WebView, WebViewClient}
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.preferences._
import
com.github.shadowsocks.preferences._
import
com.github.shadowsocks.utils.CloseUtils._
import
com.github.shadowsocks.utils.CloseUtils._
import
com.github.shadowsocks.utils.
{
Key
,
Utils
}
import
com.github.shadowsocks.utils.
Key
object
ShadowsocksSettings
{
object
ShadowsocksSettings
{
// Constants
// Constants
...
@@ -196,16 +196,10 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
...
@@ -196,16 +196,10 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
private
var
enabled
=
true
private
var
enabled
=
true
def
setEnabled
(
enabled
:
Boolean
)
{
def
setEnabled
(
enabled
:
Boolean
)
{
this
.
enabled
=
enabled
this
.
enabled
=
enabled
findPreference
(
Key
.
isNAT
).
setEnabled
(
enabled
)
for
(
name
<-
Key
.
isNAT
#::
PROXY_PREFS
.
toStream
#:::
FEATURE_PREFS
.
toStream
)
{
for
(
name
<-
PROXY_PREFS
)
{
val
pref
=
findPreference
(
name
)
val
pref
=
findPreference
(
name
)
if
(
pref
!=
null
)
pref
.
setEnabled
(
enabled
)
if
(
pref
!=
null
)
pref
.
setEnabled
(
enabled
)
}
}
for
(
name
<-
FEATURE_PREFS
)
{
val
pref
=
findPreference
(
name
)
if
(
pref
!=
null
)
pref
.
setEnabled
(
enabled
&&
(
name
!=
Key
.
isProxyApps
||
Utils
.
isLollipopOrAbove
||
!
ShadowsocksApplication
.
isVpnEnabled
))
}
}
}
def
update
(
profile
:
Profile
)
{
def
update
(
profile
:
Profile
)
{
...
...
Write
Preview
Markdown
is supported
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