Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
swiftcleanerphonehelper
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
swiftcleanerphonehelper
Commits
16332edf
Commit
16332edf
authored
Dec 20, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
beb913b0
c41dc2fa
Pipeline
#1411
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
StartActivity.java
.../com/swiftcleaner/chovey/view/activity/StartActivity.java
+2
-1
ZxApplication.kt
app/src/main/java/com/zxdemo/ZxApplication.kt
+4
-1
NotificationUtils.kt
app/src/main/java/com/zxdemo/notity/NotificationUtils.kt
+2
-2
PermanentNotifyService.kt
...rc/main/java/com/zxdemo/service/PermanentNotifyService.kt
+0
-3
No files found.
app/src/main/java/com/swiftcleaner/chovey/view/activity/StartActivity.java
View file @
16332edf
...
...
@@ -33,6 +33,7 @@ import com.swiftcleaner.chovey.view.MainActivity;
import
com.zxdemo.ZxApplication
;
import
com.zxdemo.admob.AdmobHelper
;
import
com.zxdemo.http.ZxHttp
;
import
com.zxdemo.service.PermanentNotifyService
;
import
com.zxdemo.utils.ActivityLauncher
;
import
com.zxdemo.utils.NonBlockingCountdown
;
...
...
@@ -87,7 +88,7 @@ public class StartActivity extends AppCompatActivity {
//协议
setupAgreementTextView
();
}
PermanentNotifyService
.
Companion
.
startOmgNotification
(
this
);
}
@Override
...
...
app/src/main/java/com/zxdemo/ZxApplication.kt
View file @
16332edf
...
...
@@ -6,6 +6,7 @@ import android.app.KeyguardManager
import
android.content.Context
import
android.content.Intent
import
android.content.IntentFilter
import
android.os.Build
import
android.os.Bundle
import
android.os.PowerManager
import
android.text.TextUtils
...
...
@@ -54,7 +55,9 @@ class ZxApplication : Application() {
val
powerManager
=
getSystemService
(
Context
.
POWER_SERVICE
)
as
PowerManager
isScreenOn
=
powerManager
.
isInteractive
startOmgNotification
()
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
TIRAMISU
)
{
startOmgNotification
()
}
}
fun
initApp
()
{
...
...
app/src/main/java/com/zxdemo/notity/NotificationUtils.kt
View file @
16332edf
...
...
@@ -90,10 +90,10 @@ object NotificationUtils {
.
setLargeIcon
(
BitmapFactory
.
decodeResource
(
context
.
resources
,
R
.
mipmap
.
ic_launcher
R
.
mipmap
.
logox
)
)
.
setSmallIcon
(
R
.
mipmap
.
ic_launcher_round
)
.
setSmallIcon
(
R
.
mipmap
.
logox
)
.
setVibrate
(
longArrayOf
(
0
))
// 禁止震动
.
setSound
(
null
)
// 禁止声音
.
setContentTitle
(
""
)
...
...
app/src/main/java/com/zxdemo/service/PermanentNotifyService.kt
View file @
16332edf
...
...
@@ -30,9 +30,6 @@ class PermanentNotifyService : Service() {
var
isRunning
=
false
fun
Context
.
startOmgNotification
()
{
val
intent
=
Intent
(
this
,
PermanentNotifyService
::
class
.
java
)
if
(
Build
.
VERSION
.
SDK_INT
>
Build
.
VERSION_CODES
.
TIRAMISU
)
{
return
}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
startForegroundService
(
intent
)
...
...
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