summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InvariantDeviceProfile.java
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2015-09-29 16:58:02 -0700
committerWinson <winsonc@google.com>2015-09-29 16:58:02 -0700
commit46a06da01cded4ba355381be41455f85f85369fa (patch)
tree276094c96ded1eb1c7cd314740a67fd358eead0d /src/com/android/launcher3/InvariantDeviceProfile.java
parentc088049113c261331b5685e64050d14a31cd72df (diff)
downloadandroid_packages_apps_Trebuchet-46a06da01cded4ba355381be41455f85f85369fa.tar.gz
android_packages_apps_Trebuchet-46a06da01cded4ba355381be41455f85f85369fa.tar.bz2
android_packages_apps_Trebuchet-46a06da01cded4ba355381be41455f85f85369fa.zip
Fixing other missing cases of truncated sorts.
Bug: 24505761 Change-Id: I9b9358e8b134f0c4aac32ac536d9c8a1f0629957
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index ae204c40c..ae430e049 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -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));
}
});