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
f45ee8d1
Commit
f45ee8d1
authored
Oct 17, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #46
parent
5f1b0e60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
build.sbt
build.sbt
+1
-1
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+17
-7
No files found.
build.sbt
View file @
f45ee8d1
...
...
@@ -13,7 +13,7 @@ libraryDependencies ++= Seq(
)
libraryDependencies
++=
Seq
(
"de.keyboardsurfer.android.widget"
%
"crouton"
%
"1.
7
"
,
"de.keyboardsurfer.android.widget"
%
"crouton"
%
"1.
8.1
"
,
"com.nostra13.universalimageloader"
%
"universal-image-loader"
%
"1.8.4"
,
"com.j256.ormlite"
%
"ormlite-core"
%
"4.47"
,
"com.j256.ormlite"
%
"ormlite-android"
%
"4.47"
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
f45ee8d1
...
...
@@ -48,8 +48,7 @@ import android.util.Log
import
android.view._
import
android.widget._
import
com.google.analytics.tracking.android.
{
MapBuilder
,
EasyTracker
}
import
de.keyboardsurfer.android.widget.crouton.Crouton
import
de.keyboardsurfer.android.widget.crouton.Style
import
de.keyboardsurfer.android.widget.crouton.
{
Crouton
,
Style
,
Configuration
}
import
java.io._
import
java.util.Hashtable
import
net.saik0.android.unifiedpreference.UnifiedPreferenceFragment
...
...
@@ -714,10 +713,14 @@ class Shadowsocks
if
(
ShadowVpnService
.
isServiceStarted
(
this
))
{
val
style
=
new
Style
.
Builder
()
.
setBackgroundColorValue
(
Style
.
holoBlueLight
)
.
setDuration
(
Style
.
DURATION_INFINITE
)
.
build
()
val
config
=
new
Configuration
.
Builder
()
.
setDuration
(
Configuration
.
DURATION_LONG
)
.
build
()
switchButton
.
setEnabled
(
false
)
Crouton
.
makeText
(
Shadowsocks
.
this
,
R
.
string
.
vpn_status
,
style
).
show
()
Crouton
.
makeText
(
Shadowsocks
.
this
,
R
.
string
.
vpn_status
,
style
)
.
setConfiguration
(
config
)
.
show
()
}
setPreferenceEnabled
(
enabled
=
false
)
onStateChanged
(
State
.
CONNECTED
,
null
)
...
...
@@ -878,9 +881,13 @@ class Shadowsocks
startService
(
intent
)
val
style
=
new
Style
.
Builder
()
.
setBackgroundColorValue
(
Style
.
holoBlueLight
)
.
setDuration
(
Style
.
DURATION_INFINITE
)
.
build
()
Crouton
.
makeText
(
Shadowsocks
.
this
,
R
.
string
.
vpn_status
,
style
).
show
()
val
config
=
new
Configuration
.
Builder
()
.
setDuration
(
Configuration
.
DURATION_LONG
)
.
build
()
Crouton
.
makeText
(
Shadowsocks
.
this
,
R
.
string
.
vpn_status
,
style
)
.
setConfiguration
(
config
)
.
show
()
switchButton
.
setEnabled
(
false
)
}
else
{
if
(
ShadowsocksService
.
isServiceStarted
(
this
))
return
false
...
...
@@ -972,10 +979,13 @@ class Shadowsocks
Crouton
.
cancelAllCroutons
()
val
style
=
new
Style
.
Builder
()
.
setBackgroundColorValue
(
Style
.
holoRedLight
)
.
setDuration
(
Style
.
DURATION_INFINITE
)
.
build
()
val
config
=
new
Configuration
.
Builder
()
.
setDuration
(
Configuration
.
DURATION_LONG
)
.
build
()
Crouton
.
makeText
(
Shadowsocks
.
this
,
getString
(
R
.
string
.
vpn_error
).
format
(
m
),
style
)
.
setConfiguration
(
config
)
.
show
()
}
setPreferenceEnabled
(
enabled
=
true
)
...
...
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