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

Commit c3af856c authored by jinho.park's avatar jinho.park Committed by Gerrit Code Review
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.

CYNGNOS-457

Change-Id: I248863ef8a5c49cc7114cb2965f3d6b78f4faa59
Signed-off-by: default avatarJinho Park <jinho.park@lge.com>
(cherry picked from commit 0bb55254)
parent bbba977b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1640,8 +1640,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;
            }