Add logging around overrides in notification profiles.

This commit is contained in:
Michelle Tang
2025-09-15 13:00:23 -04:00
committed by Greyson Parrelli
parent 0b71b1837c
commit a575626abb
2 changed files with 9 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.notifications.profiles
import android.content.Context
import org.signal.core.util.concurrent.SignalExecutors
import org.signal.core.util.logging.Log
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.database.SignalDatabase
import org.thoughtcrime.securesms.keyvalue.NotificationProfileValues
@@ -22,6 +23,8 @@ import java.time.ZoneId
*/
object NotificationProfiles {
val TAG = Log.tag(NotificationProfiles::class.java)
@JvmStatic
@JvmOverloads
fun getActiveProfile(profiles: List<NotificationProfile>, now: Long = System.currentTimeMillis(), zoneId: ZoneId = ZoneId.systemDefault()): NotificationProfile? {
@@ -39,6 +42,7 @@ object NotificationProfiles {
}
if (shouldClearManualOverride(manualProfile, scheduledProfile)) {
Log.i(TAG, "Clearing manual override")
SignalExecutors.UNBOUNDED.execute {
SignalDatabase.recipients.markNeedsSync(Recipient.self().id)
StorageSyncHelper.scheduleSyncForDataChange()