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
6408450b
Commit
6408450b
authored
Dec 19, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable unavailable configurations for proxy mode
This prevents user confusion.
parent
723097fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
...main/java/com/github/shadowsocks/ProfileConfigFragment.kt
+4
-2
No files found.
mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
View file @
6408450b
...
@@ -33,7 +33,6 @@ import android.support.v7.preference.PreferenceDataStore
...
@@ -33,7 +33,6 @@ import android.support.v7.preference.PreferenceDataStore
import
android.support.v7.widget.Toolbar
import
android.support.v7.widget.Toolbar
import
android.view.MenuItem
import
android.view.MenuItem
import
com.github.shadowsocks.App.Companion.app
import
com.github.shadowsocks.App.Companion.app
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.plugin.PluginConfiguration
import
com.github.shadowsocks.plugin.PluginConfiguration
...
@@ -78,15 +77,18 @@ class ProfileConfigFragment : PreferenceFragmentCompatDividers(), Toolbar.OnMenu
...
@@ -78,15 +77,18 @@ class ProfileConfigFragment : PreferenceFragmentCompatDividers(), Toolbar.OnMenu
findPreference
(
Key
.
remotePort
).
summary
=
"1337"
findPreference
(
Key
.
remotePort
).
summary
=
"1337"
findPreference
(
Key
.
password
).
summary
=
"\u2022"
.
repeat
(
32
)
findPreference
(
Key
.
password
).
summary
=
"\u2022"
.
repeat
(
32
)
}
}
val
serviceMode
=
DataStore
.
serviceMode
findPreference
(
Key
.
remoteDns
).
isEnabled
=
serviceMode
!=
Key
.
modeProxy
isProxyApps
=
findPreference
(
Key
.
proxyApps
)
as
SwitchPreference
isProxyApps
=
findPreference
(
Key
.
proxyApps
)
as
SwitchPreference
if
(
Build
.
VERSION
.
SDK_INT
<
21
)
isProxyApps
.
parent
!!
.
removePreference
(
isProxyApps
)
else
{
if
(
Build
.
VERSION
.
SDK_INT
<
21
)
isProxyApps
.
parent
!!
.
removePreference
(
isProxyApps
)
else
{
isProxyApps
.
isEnabled
=
BaseService
.
usingVpnMode
isProxyApps
.
isEnabled
=
serviceMode
==
Key
.
modeVpn
isProxyApps
.
setOnPreferenceClickListener
{
isProxyApps
.
setOnPreferenceClickListener
{
startActivity
(
Intent
(
activity
,
AppManager
::
class
.
java
))
startActivity
(
Intent
(
activity
,
AppManager
::
class
.
java
))
isProxyApps
.
isChecked
=
true
isProxyApps
.
isChecked
=
true
false
false
}
}
}
}
findPreference
(
Key
.
udpdns
).
isEnabled
=
serviceMode
!=
Key
.
modeProxy
plugin
=
findPreference
(
Key
.
plugin
)
as
IconListPreference
plugin
=
findPreference
(
Key
.
plugin
)
as
IconListPreference
pluginConfigure
=
findPreference
(
Key
.
pluginConfigure
)
as
EditTextPreference
pluginConfigure
=
findPreference
(
Key
.
pluginConfigure
)
as
EditTextPreference
plugin
.
unknownValueSummary
=
getString
(
R
.
string
.
plugin_unknown
)
plugin
.
unknownValueSummary
=
getString
(
R
.
string
.
plugin_unknown
)
...
...
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