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
738febba
Commit
738febba
authored
Oct 15, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always show stop button for now
Fix #940.
parent
ed91010b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
src/main/scala/com/github/shadowsocks/ShadowsocksNotification.scala
...cala/com/github/shadowsocks/ShadowsocksNotification.scala
+1
-1
src/main/scala/com/github/shadowsocks/ShadowsocksTileService.scala
...scala/com/github/shadowsocks/ShadowsocksTileService.scala
+0
-13
No files found.
src/main/scala/com/github/shadowsocks/ShadowsocksNotification.scala
View file @
738febba
...
@@ -40,7 +40,7 @@ class ShadowsocksNotification(private val service: BaseService, profileName: Str
...
@@ -40,7 +40,7 @@ class ShadowsocksNotification(private val service: BaseService, profileName: Str
.
setContentIntent
(
PendingIntent
.
getActivity
(
service
,
0
,
new
Intent
(
service
,
classOf
[
Shadowsocks
])
.
setContentIntent
(
PendingIntent
.
getActivity
(
service
,
0
,
new
Intent
(
service
,
classOf
[
Shadowsocks
])
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
),
0
))
.
setFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
),
0
))
.
setSmallIcon
(
R
.
drawable
.
ic_stat_shadowsocks
)
.
setSmallIcon
(
R
.
drawable
.
ic_stat_shadowsocks
)
if
(!
ShadowsocksTileService
.
running
)
builder
.
addAction
(
R
.
drawable
.
ic_navigation_close
,
builder
.
addAction
(
R
.
drawable
.
ic_navigation_close
,
service
.
getString
(
R
.
string
.
stop
),
PendingIntent
.
getBroadcast
(
service
,
0
,
new
Intent
(
Action
.
CLOSE
),
0
))
service
.
getString
(
R
.
string
.
stop
),
PendingIntent
.
getBroadcast
(
service
,
0
,
new
Intent
(
Action
.
CLOSE
),
0
))
app
.
profileManager
.
getAllProfiles
match
{
app
.
profileManager
.
getAllProfiles
match
{
case
Some
(
profiles
)
=>
if
(
profiles
.
length
>
1
)
case
Some
(
profiles
)
=>
if
(
profiles
.
length
>
1
)
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksTileService.scala
View file @
738febba
...
@@ -9,10 +9,6 @@ import com.github.shadowsocks.utils.{State, Utils}
...
@@ -9,10 +9,6 @@ import com.github.shadowsocks.utils.{State, Utils}
/**
/**
* @author Mygod
* @author Mygod
*/
*/
object
ShadowsocksTileService
{
var
running
:
Boolean
=
_
}
@TargetApi
(
24
)
@TargetApi
(
24
)
final
class
ShadowsocksTileService
extends
TileService
with
ServiceBoundContext
{
final
class
ShadowsocksTileService
extends
TileService
with
ServiceBoundContext
{
import
ShadowsocksTileService._
import
ShadowsocksTileService._
...
@@ -46,15 +42,6 @@ final class ShadowsocksTileService extends TileService with ServiceBoundContext
...
@@ -46,15 +42,6 @@ final class ShadowsocksTileService extends TileService with ServiceBoundContext
override
def
onServiceConnected
()
=
callback
.
stateChanged
(
bgService
.
getState
,
bgService
.
getProfileName
,
null
)
override
def
onServiceConnected
()
=
callback
.
stateChanged
(
bgService
.
getState
,
bgService
.
getProfileName
,
null
)
override
def
onCreate
{
super
.
onCreate
running
=
true
}
override
def
onDestroy
{
super
.
onDestroy
running
=
false
}
override
def
onStartListening
{
override
def
onStartListening
{
super
.
onStartListening
super
.
onStartListening
attachService
(
callback
)
attachService
(
callback
)
...
...
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