Skip to content

Commit

Permalink
quiethours: inclusive start hour
Browse files Browse the repository at this point in the history
If quiethours is defined to start at 01:00 it should start at 01:00 not at 01:01

Change-Id: I0d0fe35a9235fb4bb04794e94f7678ee137d9be7
Signed-off-by: Jorge Ruesga <[email protected]>
  • Loading branch information
jruesga committed Jul 8, 2014
1 parent 6a7eb48 commit 5076d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/java/com/android/internal/util/cm/QuietHoursUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public static boolean inQuietHours(int quietHoursStart, int quietHoursEnd) {

if (quietHoursEnd < quietHoursStart) {
// Starts at night, ends in the morning.
return (minutes > quietHoursStart) || (minutes < quietHoursEnd);
return (minutes >= quietHoursStart) || (minutes < quietHoursEnd);
} else {
// Starts in the morning, ends at night.
return (minutes > quietHoursStart) && (minutes < quietHoursEnd);
return (minutes >= quietHoursStart) && (minutes < quietHoursEnd);
}
}
return false;
Expand Down

0 comments on commit 5076d46

Please sign in to comment.