Commit c1f71b28 authored by wanglei's avatar wanglei

...

parent 61153e81
......@@ -14,7 +14,6 @@ object ConstObject {
const val ID_INSTALL_APP = 20000
const val ID_UNINSTALL_APP = 20001
const val ID_JUNK_CLEANER = 12001
const val ID_CLEAN_JUNK_MEMORY = 12009
const val ID_NEWS = 12002
const val ID_SCAN_CODE = 12003
const val ID_APP_PROCESS = 12004
......
......@@ -37,10 +37,6 @@ object NotificationHelp {
canPush = canPushJunkClean()
}
ConstObject.ID_CLEAN_JUNK_MEMORY -> {
}
ConstObject.ID_NEWS -> {
canPush = canPushNews()
}
......@@ -117,7 +113,6 @@ object NotificationHelp {
private val NOTIFICATION_IDS = intArrayOf(
ConstObject.ID_JUNK_CLEANER,
ConstObject.ID_CLEAN_JUNK_MEMORY,
ConstObject.ID_NEWS,
ConstObject.ID_APP_PROCESS,
ConstObject.ID_WEATHER
......
......@@ -17,7 +17,6 @@ import androidx.core.graphics.drawable.IconCompat
import com.base.browserwhite.MyApplication
import com.base.browserwhite.R
import com.base.browserwhite.bean.ConstObject.ID_APP_PROCESS
import com.base.browserwhite.bean.ConstObject.ID_CLEAN_JUNK_MEMORY
import com.base.browserwhite.bean.ConstObject.ID_INSTALL_APP
import com.base.browserwhite.bean.ConstObject.ID_JUNK_CLEANER
import com.base.browserwhite.bean.ConstObject.ID_NEWS
......@@ -65,19 +64,19 @@ object NotificationUiUtil {
sendNotificationUI(context, actionId, bigRemoteViews, smallRemoteViews)
}
ID_CLEAN_JUNK_MEMORY -> {//清理和内存
var size = fastGetJunkSize(context)
if (size == 0L) {
size = Random.nextLong(1024 * 5, 1024 * 10)
}
val bigRemoteViews = RemoteViews(context.packageName, R.layout.notification_junk_memory_small)
bigRemoteViews.setTextViewText(R.id.tv_size, size.toFormatSize())
val smallRemoteViews = RemoteViews(context.packageName, R.layout.notification_junk_memory_small)
smallRemoteViews.setTextViewText(R.id.tv_size, size.toFormatSize())
sendNotificationUI(context, actionId, bigRemoteViews, smallRemoteViews)
}
// ID_CLEAN_JUNK_MEMORY -> {//清理和内存
// var size = fastGetJunkSize(context)
// if (size == 0L) {
// size = Random.nextLong(1024 * 5, 1024 * 10)
// }
// val bigRemoteViews = RemoteViews(context.packageName, R.layout.notification_junk_memory_small)
// bigRemoteViews.setTextViewText(R.id.tv_size, size.toFormatSize())
//
// val smallRemoteViews = RemoteViews(context.packageName, R.layout.notification_junk_memory_small)
// smallRemoteViews.setTextViewText(R.id.tv_size, size.toFormatSize())
//
// sendNotificationUI(context, actionId, bigRemoteViews, smallRemoteViews)
// }
ID_NEWS -> {//新闻
val mainHandler = Handler(Looper.getMainLooper())
......
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