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
93a26969
Commit
93a26969
authored
Oct 28, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine refreshing
parent
8172befb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
+2
-0
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+2
-3
src/main/scala/com/github/shadowsocks/ShadowsocksService.scala
...ain/scala/com/github/shadowsocks/ShadowsocksService.scala
+2
-0
src/main/scala/com/github/shadowsocks/Utils.scala
src/main/scala/com/github/shadowsocks/Utils.scala
+5
-0
No files found.
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
View file @
93a26969
...
@@ -366,6 +366,8 @@ class ShadowVpnService extends VpnService {
...
@@ -366,6 +366,8 @@ class ShadowVpnService extends VpnService {
override
def
onCreate
()
{
override
def
onCreate
()
{
super
.
onCreate
()
super
.
onCreate
()
Config
.
refresh
(
this
)
EasyTracker
EasyTracker
.
getInstance
(
this
)
.
getInstance
(
this
)
.
send
(
MapBuilder
.
send
(
MapBuilder
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
93a26969
...
@@ -739,11 +739,10 @@ class Shadowsocks
...
@@ -739,11 +739,10 @@ class Shadowsocks
}
}
}
}
val
container
=
getApplication
.
asInstanceOf
[
ShadowsocksApplication
].
tagContainer
if
(
container
!=
null
)
container
.
refresh
();
switchButton
.
setOnCheckedChangeListener
(
this
)
switchButton
.
setOnCheckedChangeListener
(
this
)
Config
.
refresh
(
this
)
}
}
private
def
setPreferenceEnabled
(
enabled
:
Boolean
)
{
private
def
setPreferenceEnabled
(
enabled
:
Boolean
)
{
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksService.scala
View file @
93a26969
...
@@ -388,6 +388,8 @@ class ShadowsocksService extends Service {
...
@@ -388,6 +388,8 @@ class ShadowsocksService extends Service {
override
def
onCreate
()
{
override
def
onCreate
()
{
super
.
onCreate
()
super
.
onCreate
()
Config
.
refresh
(
this
)
EasyTracker
EasyTracker
.
getInstance
(
this
)
.
getInstance
(
this
)
.
send
(
MapBuilder
.
send
(
MapBuilder
...
...
src/main/scala/com/github/shadowsocks/Utils.scala
View file @
93a26969
...
@@ -111,6 +111,11 @@ object Config {
...
@@ -111,6 +111,11 @@ object Config {
}
}
}
}
def
refresh
(
context
:
Context
)
{
val
container
=
context
.
getApplicationContext
.
asInstanceOf
[
ShadowsocksApplication
].
tagContainer
if
(
container
!=
null
)
container
.
refresh
()
}
def
getPublicConfig
(
container
:
Container
,
config
:
Config
)
:
Config
=
{
def
getPublicConfig
(
container
:
Container
,
config
:
Config
)
:
Config
=
{
val
list
=
container
.
getString
(
"proxy_list"
)
val
list
=
container
.
getString
(
"proxy_list"
)
val
proxies
=
util
.
Random
.
shuffle
(
list
.
split
(
'|'
).
toSeq
).
toSeq
val
proxies
=
util
.
Random
.
shuffle
(
list
.
split
(
'|'
).
toSeq
).
toSeq
...
...
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