diff options
author | John Spurlock <jspurlock@google.com> | 2014-09-30 14:55:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-30 14:55:22 +0000 |
commit | a932e9448d6380e625684622e96d063f20316a80 (patch) | |
tree | 916cb40e1c411793e3cb186a6d04bd18c7c202bc | |
parent | bf07602f994b6136ec01832a2d5c79f0f98cb51f (diff) | |
parent | 39838b98f1fef11ff29bf682029331849a39a633 (diff) | |
download | frameworks_base-a932e9448d6380e625684622e96d063f20316a80.zip frameworks_base-a932e9448d6380e625684622e96d063f20316a80.tar.gz frameworks_base-a932e9448d6380e625684622e96d063f20316a80.tar.bz2 |
am 39838b98: Merge "Zen: Fix downtime calculation for Sunday mornings." into lmp-dev
* commit '39838b98f1fef11ff29bf682029331849a39a633':
Zen: Fix downtime calculation for Sunday mornings.
-rw-r--r-- | services/core/java/com/android/server/notification/DowntimeConditionProvider.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/DowntimeConditionProvider.java b/services/core/java/com/android/server/notification/DowntimeConditionProvider.java index b71bad8..efe47c3 100644 --- a/services/core/java/com/android/server/notification/DowntimeConditionProvider.java +++ b/services/core/java/com/android/server/notification/DowntimeConditionProvider.java @@ -193,7 +193,8 @@ public class DowntimeConditionProvider extends ConditionProviderService { } private boolean isInDowntime(int daysOffset, long time, long start, long end) { - final int day = ((getDayOfWeek(time) + daysOffset - 1) % Calendar.SATURDAY) + 1; + final int n = Calendar.SATURDAY; + final int day = ((getDayOfWeek(time) - 1) + (daysOffset % n) + n) % n + 1; start = addDays(start, daysOffset); end = addDays(end, daysOffset); return mDays.contains(day) && time >= start && time < end; |