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

Commit 0bb55254 authored by jinho.park's avatar jinho.park Committed by Steve Kondik
Browse files

Fix bug regarding the comparator sorts Alarms into increasing time order.



The comparator used variable "when" in IncreasingTimeOrder class.
variable "when" means "elapsed time" or "real time"(RTC) and these types have different unit of time.
so, I recommend that you use a "whenElapsed" which has the equal unit of time as its default value.

Change-Id: I248863ef8a5c49cc7114cb2965f3d6b78f4faa59
Signed-off-by: default avatarJinho Park <jinho.park@lge.com>
parent d1094773
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1639,8 +1639,8 @@ class AlarmManagerService extends SystemService {
     */
    public static class IncreasingTimeOrder implements Comparator<Alarm> {
        public int compare(Alarm a1, Alarm a2) {
            long when1 = a1.when;
            long when2 = a2.when;
            long when1 = a1.whenElapsed;
            long when2 = a2.whenElapsed;
            if (when1 - when2 > 0) {
                return 1;
            }