mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Fixing other missing cases of truncated sorts." into ub-launcher3-burnaby-polish
This commit is contained in:
@@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user