do grace period calculation only on positive periods

This commit is contained in:
Daniel Gultsch 2018-08-18 18:20:58 +02:00
parent 8f057a0c95
commit 02b7b0b4a6
1 changed files with 4 additions and 2 deletions

View File

@ -604,8 +604,10 @@ public class Account extends AbstractEntity {
return this.avatar;
}
public void activateGracePeriod(long duration) {
this.mEndGracePeriod = SystemClock.elapsedRealtime() + duration;
public void activateGracePeriod(final long duration) {
if (duration > 0) {
this.mEndGracePeriod = SystemClock.elapsedRealtime() + duration;
}
}
public void deactivateGracePeriod() {