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

Commit 46a06da0 authored by Winson's avatar Winson
Browse files

Fixing other missing cases of truncated sorts.

Bug: 24505761
Change-Id: I9b9358e8b134f0c4aac32ac536d9c8a1f0629957
parent c0880491
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -252,8 +252,8 @@ public class InvariantDeviceProfile {
        ArrayList<InvariantDeviceProfile> pointsByNearness = points;
        Collections.sort(pointsByNearness, new Comparator<InvariantDeviceProfile>() {
            public int compare(InvariantDeviceProfile a, InvariantDeviceProfile b) {
                return (int) (dist(width, height, a.minWidthDps, a.minHeightDps)
                        - dist(width, height, b.minWidthDps, b.minHeightDps));
                return Float.compare(dist(width, height, a.minWidthDps, a.minHeightDps),
                        dist(width, height, b.minWidthDps, b.minHeightDps));
            }
        });

+1 −1
Original line number Diff line number Diff line
@@ -2469,7 +2469,7 @@ public class LauncherModel extends BroadcastReceiver
                            lhs.cellY * cellCountX + lhs.cellX);
                    long rr = (rhs.container * containerOffset + rhs.screenId * screenOffset +
                            rhs.cellY * cellCountX + rhs.cellX);
                    return (int) (lr - rr);
                    return Long.compare(lr, rr);
                }
            });
        }