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

Commit 52047ab1 authored by Chris Tate's avatar Chris Tate Committed by Android Git Automerger
Browse files

am 386a5a29: am 396b83b0: Merge "Fix overflow/underflow problem in comparison"

* commit '386a5a29':
  Fix overflow/underflow problem in comparison
parents c425e570 386a5a29
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -400,10 +400,10 @@ class AlarmManagerService extends SystemService {
        public int compare(Batch b1, Batch b2) {
            long when1 = b1.start;
            long when2 = b2.start;
            if (when1 - when2 > 0) {
            if (when1 > when2) {
                return 1;
            }
            if (when1 - when2 < 0) {
            if (when1 < when2) {
                return -1;
            }
            return 0;
@@ -1806,10 +1806,10 @@ class AlarmManagerService extends SystemService {
        public int compare(Alarm a1, Alarm a2) {
            long when1 = a1.whenElapsed;
            long when2 = a2.whenElapsed;
            if (when1 - when2 > 0) {
            if (when1 > when2) {
                return 1;
            }
            if (when1 - when2 < 0) {
            if (when1 < when2) {
                return -1;
            }
            return 0;