Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 452b68b6 authored by Daria Evdokimova's avatar Daria Evdokimova
Browse files

Fixing bug where 12pm becomes 24pm

Now if a user sends a voice action 'Dismiss alarm for 12pm' we (mistakenly)
convert that to HOUR_OF_DAY = 24 instead of HOUR_OF_DAY = 12.
This CL changes it so that +12 hours is added only if hour < 12.

Change-Id: I5b505a6eb5c154cca49f1f37bde7f21f8081948d
parent 12e8c045
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class FetchMatchingAlarmsAction implements Runnable {
                    return;
                }

                final int hour24 = Boolean.TRUE.equals(isPm) ? (hour + 12) : hour;
                final int hour24 = Boolean.TRUE.equals(isPm) && hour < 12 ? (hour + 12) : hour;

                final List<Alarm> selectedAlarms = new ArrayList<>();
                for (Alarm alarm : mAlarms) {