Commit 71525fb1 authored by guest's avatar guest

添加上报开关配置

parent cc6dc0ac
......@@ -12,6 +12,21 @@ import java.util.Locale
object EventUtils {
private val TAG = "EventUtils"
private val push_limit by lazy {
listOf(
"fcm_message_received",
"showNotification",
"Notification_Popup",
"alarm_push",
"FCM_Received",
"workmanager_live",
"workmanager",
"Notification_Error",
"alarm_push2"
)
}
val isPushReportSwitch
get() = AppPreferences.getInstance().getString("push_report_switch", "0").toInt()
fun event(
key: String,
value: String? = null,
......@@ -22,6 +37,9 @@ object EventUtils {
if (!ifAgreePrivacy) {
return
}
if (isPushReportSwitch==0 && push_limit.any { key.startsWith(it, ignoreCase = true) }) {
return
}
if (isSingleEvent) {
val stringSet = AppPreferences.getInstance().getStringSet("singleEvent", setOf())
......
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