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
18f03aeb
Commit
18f03aeb
authored
Jun 17, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move tile service to a separate process to save memory
parent
8e3af716
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+1
-0
src/main/scala/com/github/shadowsocks/ShadowsocksTileService.scala
...scala/com/github/shadowsocks/ShadowsocksTileService.scala
+2
-0
No files found.
src/main/AndroidManifest.xml
View file @
18f03aeb
...
@@ -129,6 +129,7 @@
...
@@ -129,6 +129,7 @@
</service>
</service>
<service
android:name=
".ShadowsocksTileService"
android:label=
"@string/quick_toggle"
<service
android:name=
".ShadowsocksTileService"
android:label=
"@string/quick_toggle"
android:process=
":qstile"
android:icon=
"@drawable/ic_start_connected"
android:icon=
"@drawable/ic_start_connected"
android:permission=
"android.permission.BIND_QUICK_SETTINGS_TILE"
>
android:permission=
"android.permission.BIND_QUICK_SETTINGS_TILE"
>
<intent-filter>
<intent-filter>
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksTileService.scala
View file @
18f03aeb
package
com.github.shadowsocks
package
com.github.shadowsocks
import
android.annotation.TargetApi
import
android.graphics.drawable.Icon
import
android.graphics.drawable.Icon
import
android.service.quicksettings.
{
Tile
,
TileService
}
import
android.service.quicksettings.
{
Tile
,
TileService
}
import
com.github.shadowsocks.aidl.IShadowsocksServiceCallback
import
com.github.shadowsocks.aidl.IShadowsocksServiceCallback
...
@@ -9,6 +10,7 @@ import com.github.shadowsocks.ShadowsocksApplication.app
...
@@ -9,6 +10,7 @@ import com.github.shadowsocks.ShadowsocksApplication.app
/**
/**
* @author Mygod
* @author Mygod
*/
*/
@TargetApi
(
24
)
final
class
ShadowsocksTileService
extends
TileService
with
ServiceBoundContext
{
final
class
ShadowsocksTileService
extends
TileService
with
ServiceBoundContext
{
private
lazy
val
iconIdle
=
Icon
.
createWithResource
(
this
,
R
.
drawable
.
ic_start_idle
).
setTint
(
0x80ffffff
)
private
lazy
val
iconIdle
=
Icon
.
createWithResource
(
this
,
R
.
drawable
.
ic_start_idle
).
setTint
(
0x80ffffff
)
private
lazy
val
iconBusy
=
Icon
.
createWithResource
(
this
,
R
.
drawable
.
ic_start_busy
)
private
lazy
val
iconBusy
=
Icon
.
createWithResource
(
this
,
R
.
drawable
.
ic_start_busy
)
...
...
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