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

Commit df7f900c authored by jinho.park's avatar jinho.park
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 3f453164
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1480,8 +1480,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;
            }