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

Commit 1acd32a6 authored by jinho.park's avatar jinho.park Committed by Christopher Tate
Browse files

DO NOT MERGE 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.

Signed-off-by: default avatarJinho Park <jinho.park@lge.com>

Cherry-pick from master

Change-Id: Ib95531bf235e8fc628a7eda1c24d187c12a9ab3b
parent b3af4f43
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1706,8 +1706,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;
            }