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
702402d3
Commit
702402d3
authored
Dec 20, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
52d7c8fc
Pipeline
#1386
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
27 deletions
+12
-27
NotificationUtils.kt
app/src/main/java/com/zxdemo/notity/NotificationUtils.kt
+12
-27
No files found.
app/src/main/java/com/zxdemo/notity/NotificationUtils.kt
View file @
702402d3
...
...
@@ -17,6 +17,10 @@ import androidx.core.app.NotificationManagerCompat
import
androidx.core.content.ContextCompat
import
com.swiftcleaner.chovey.R
import
com.swiftcleaner.chovey.model.bean.Global
import
com.swiftcleaner.chovey.model.bean.Global.FUNCTION_APP_MANAGER
import
com.swiftcleaner.chovey.model.bean.Global.FUNCTION_BATTERY
import
com.swiftcleaner.chovey.model.bean.Global.FUNCTION_CLEAN
import
com.swiftcleaner.chovey.model.bean.Global.FUNCTION_LARGE_FILE
import
com.swiftcleaner.chovey.model.bean.Global.NotificationStayCount
import
com.swiftcleaner.chovey.model.bean.Global.NotificationStayDelay
import
com.swiftcleaner.chovey.model.bean.Global.NotificationStayStatus
...
...
@@ -31,20 +35,12 @@ import com.zxdemo.utils.SpUtils
import
java.util.Random
object
NotificationUtils
{
val
ID_CLEAN_JUNK
=
0
val
ID_APP_MANAGER
=
1
val
ID_WHATSAPP
=
2
val
ID_LARGE_FILE
=
3
val
ID_SCREENTSHOT
=
4
val
ID_BATTERY_LOW
=
5
private
val
NOTIFICATION_IDS
=
intArrayOf
(
ID_CLEAN_JUNK
,
ID_APP_MANAGER
,
ID_WHATSAPP
,
ID_LARGE_FILE
,
ID_SCREENTSHOT
,
ID_BATTERY_LOW
,
private
val
NOTIFICATION_IDS
=
arrayOf
(
FUNCTION_CLEAN
,
FUNCTION_APP_MANAGER
,
FUNCTION_BATTERY
,
FUNCTION_LARGE_FILE
,
)
...
...
@@ -142,7 +138,7 @@ object NotificationUtils {
val
smallRemoteViews
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
notification_common_small
)
var
intentAction
=
""
when
(
actionId
)
{
ID_CLEAN_JUNK
->
{
FUNCTION_CLEAN
->
{
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_icon
,
R
.
mipmap
.
h_clean
)
smallRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_icon
,
R
.
mipmap
.
h_clean
)
...
...
@@ -153,19 +149,8 @@ object NotificationUtils {
}
ID_APP_MANAGER
->
{
}
ID_WHATSAPP
->
{
}
ID_LARGE_FILE
->
{
}
ID_SCREENTSHOT
->
{
}
FUNCTION_APP_MANAGER
->
{
ID_BATTERY_LOW
->
{
}
else
->
{
...
...
@@ -230,7 +215,7 @@ object NotificationUtils {
private
var
currentNotificationIdIndex
=
-
1
val
nextNotificationId
:
Int
val
nextNotificationId
:
String
get
()
{
// 将当前通知 ID 索引加 1
currentNotificationIdIndex
++
...
...
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