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
cc070223
Commit
cc070223
authored
Dec 29, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add doc for ServiceNotification
parent
0335d67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
mobile/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt
...ain/java/com/github/shadowsocks/bg/ServiceNotification.kt
+7
-0
No files found.
mobile/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt
View file @
cc070223
...
@@ -38,6 +38,13 @@ import com.github.shadowsocks.utils.Action
...
@@ -38,6 +38,13 @@ import com.github.shadowsocks.utils.Action
import
com.github.shadowsocks.utils.broadcastReceiver
import
com.github.shadowsocks.utils.broadcastReceiver
import
java.util.*
import
java.util.*
/**
* Android < 8 VPN: always invisible because of VPN notification/icon
* Android 4.x other: always visible
* Android 5-7 other: only invisible in (possibly unsecure) lockscreen
* Android 8+: always visible due to system limitations
* (user can choose to hide the notification in secure lockscreen or anywhere)
*/
class
ServiceNotification
(
private
val
service
:
BaseService
.
Interface
,
profileName
:
String
,
class
ServiceNotification
(
private
val
service
:
BaseService
.
Interface
,
profileName
:
String
,
channel
:
String
,
private
val
visible
:
Boolean
=
false
)
{
channel
:
String
,
private
val
visible
:
Boolean
=
false
)
{
private
val
keyGuard
=
(
service
as
Context
).
getSystemService
(
Context
.
KEYGUARD_SERVICE
)
as
KeyguardManager
private
val
keyGuard
=
(
service
as
Context
).
getSystemService
(
Context
.
KEYGUARD_SERVICE
)
as
KeyguardManager
...
...
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