Commit ff4b1cd6 authored by wanglei's avatar wanglei

...

parent 834a7855
......@@ -25,6 +25,7 @@ import com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import com.base.datarecovery.utils.AppPreferences
import com.base.datarecovery.utils.CleanJunkStringResourceManager
import com.base.datarecovery.utils.DuplicatePhotoStringResourceManager
import com.base.datarecovery.utils.EventUtils
import com.base.datarecovery.utils.ScreenshotCleanupStringManager
import java.util.Random
......@@ -189,14 +190,14 @@ object NotificationUtil {
private var handler: Handler? = null
fun sendNotification(context: Context) {
val actionId: Int =getNextNotificationId()
// KParameter.Kind.INSTANCE.event("showNotification", null, null, false)
val actionId: Int = getNextNotificationId()
EventUtils.event("showNotification", null, null, false)
if (MyApplication.PAUSED_VALUE == 1) {
return
}
val interval: Int = AppPreferences.getInstance().getString("notificationInterval", "60").toIntOrNull()?:60
val interval: Int = AppPreferences.getInstance().getString("notificationInterval", "60").toIntOrNull() ?: 60
val lastTime: Long = AppPreferences.getInstance().getLong("last_notification_time", 0)
val nowTime = System.currentTimeMillis()
val x = nowTime - lastTime
......@@ -206,11 +207,11 @@ object NotificationUtil {
sendNotification(context, actionId)
val open: Int = AppPreferences.getInstance().getString("open", "0").toIntOrNull()?:0
val open: Int = AppPreferences.getInstance().getString("open", "0").toIntOrNull() ?: 0
if (open == 1) {
val num: Int = AppPreferences.getInstance().getString("num", "0").toIntOrNull()?:0
val delay: Long = AppPreferences.getInstance().getString("delay", "0").toLongOrNull()?:0L
val num: Int = AppPreferences.getInstance().getString("num", "0").toIntOrNull() ?: 0
val delay: Long = AppPreferences.getInstance().getString("delay", "0").toLongOrNull() ?: 0L
handlerThread = HandlerThread("NotificationHandlerThread")
handlerThread!!.start()
......
......@@ -22,12 +22,12 @@ object EventUtils {
}
// if (isSingleEvent) {
// val stringSet = AppPreferences.getInstance().getString("singleEvent")
// if (stringSet.contains(key)) {
// return
// }
// }
if (isSingleEvent) {
val stringSet = AppPreferences.getInstance().getStringSet("singleEvent", setOf())
if (stringSet.contains(key)) {
return
}
}
Thread {
var parmJson: String? = ""
......
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