diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-07 15:18:09 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-07 15:18:09 +0200 |
commit | 919c98207bb317e2283084dcbaa34a5216997d85 (patch) | |
tree | 170d7ca434756cbe679fe89154b56b4c321bfb34 /src/eu/siacs/conversations/services/NotificationService.java | |
parent | d5227e5c253658eb9d6bc1f7bf85397f072125d4 (diff) |
made disabled notifications permanent across restarts
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/services/NotificationService.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/services/NotificationService.java b/src/eu/siacs/conversations/services/NotificationService.java index 53c4707f..41656707 100644 --- a/src/eu/siacs/conversations/services/NotificationService.java +++ b/src/eu/siacs/conversations/services/NotificationService.java @@ -34,7 +34,7 @@ public class NotificationService { public int NOTIFICATION_ID = 0x2342; private Conversation mOpenConversation; private boolean mIsInForeground; - + private long mEndGracePeriod = 0L; public NotificationService(XmppConnectionService service) { @@ -60,8 +60,8 @@ public class NotificationService { mList.add(message); notifications.put(conversationUuid, mList); } - updateNotification((!(this.mIsInForeground && this.mOpenConversation == null) - || !isScreenOn) && !inGracePeriod()); + updateNotification((!(this.mIsInForeground && this.mOpenConversation == null) || !isScreenOn) + && !inGracePeriod()); } public void clear() { @@ -226,15 +226,15 @@ public class NotificationService { this.mIsInForeground = foreground; } - public void activateGracePeriod() { - this.mEndGracePeriod = SystemClock.elapsedRealtime() + (Config.CARBON_GRACE_PERIOD * 1000); + this.mEndGracePeriod = SystemClock.elapsedRealtime() + + (Config.CARBON_GRACE_PERIOD * 1000); } - + public void deactivateGracePeriod() { this.mEndGracePeriod = 0L; } - + private boolean inGracePeriod() { return SystemClock.elapsedRealtime() < this.mEndGracePeriod; } |