mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Add more logging around notification profile overrides.
This commit is contained in:
committed by
Greyson Parrelli
parent
7235a3730c
commit
862bab55af
@@ -42,7 +42,6 @@ object NotificationProfiles {
|
||||
}
|
||||
|
||||
if (shouldClearManualOverride(manualProfile, scheduledProfile)) {
|
||||
Log.i(TAG, "Clearing manual override")
|
||||
SignalExecutors.UNBOUNDED.execute {
|
||||
SignalDatabase.recipients.markNeedsSync(Recipient.self().id)
|
||||
StorageSyncHelper.scheduleSyncForDataChange()
|
||||
@@ -61,12 +60,14 @@ object NotificationProfiles {
|
||||
var shouldScheduleSync = false
|
||||
|
||||
if (manualProfile == null && storeValues.manuallyEnabledProfile != 0L) {
|
||||
Log.i(TAG, "Clearing override: ${storeValues.manuallyEnabledProfile} and ${storeValues.manuallyEnabledUntil}")
|
||||
storeValues.manuallyEnabledProfile = 0
|
||||
storeValues.manuallyEnabledUntil = 0
|
||||
shouldScheduleSync = true
|
||||
}
|
||||
|
||||
if (scheduledProfile != null && storeValues.manuallyDisabledAt != 0L) {
|
||||
Log.i(TAG, "Clearing override: ${storeValues.manuallyDisabledAt}")
|
||||
storeValues.manuallyDisabledAt = 0
|
||||
shouldScheduleSync = true
|
||||
}
|
||||
|
||||
@@ -312,10 +312,11 @@ object StorageSyncHelper {
|
||||
if (localProfile == null) {
|
||||
Log.w(TAG, "Unable to find local notification profile with given remote id")
|
||||
} else {
|
||||
Log.i(TAG, "Setting manually enabled profile to ${localProfile.id}")
|
||||
val disabledAt = System.currentTimeMillis()
|
||||
Log.i(TAG, "Setting manually enabled profile to ${localProfile.id} ending at $remoteEndTime. Disabled at: $disabledAt")
|
||||
SignalStore.notificationProfile.manuallyEnabledProfile = localProfile.id
|
||||
SignalStore.notificationProfile.manuallyEnabledUntil = remoteEndTime
|
||||
SignalStore.notificationProfile.manuallyDisabledAt = System.currentTimeMillis()
|
||||
SignalStore.notificationProfile.manuallyDisabledAt = disabledAt
|
||||
}
|
||||
}
|
||||
} else if (update.new.proto.notificationProfileManualOverride!!.disabledAtTimestampMs != null) {
|
||||
|
||||
Reference in New Issue
Block a user