Commit 702402d3 authored by wanglei's avatar wanglei

...

parent 52d7c8fc
Pipeline #1386 canceled with stages
......@@ -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++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment