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

Commit 0e76c612 authored by Kweku Adams's avatar Kweku Adams Committed by Android (Google) Code Review
Browse files

Merge "Use common Comparator."

parents 5473b217 788708ce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -64,8 +64,11 @@ public abstract class AlarmQueue<K> implements AlarmManager.OnAlarmListener {
     * The pair is the key and its associated alarm time (in the elapsed realtime timebase).
     */
    private static class AlarmPriorityQueue<Q> extends PriorityQueue<Pair<Q, Long>> {
        private static final Comparator<Pair<?, Long>> sTimeComparator =
                (o1, o2) -> Long.compare(o1.second, o2.second);

        AlarmPriorityQueue() {
            super(1, Comparator.comparingLong(o -> o.second));
            super(1, sTimeComparator);
        }

        /**