diff options
author | Winson Chung <winsonc@google.com> | 2015-09-30 00:06:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-30 00:06:55 +0000 |
commit | 850de64c0d0985fb6fe9bbe7c276370c8b13c839 (patch) | |
tree | 185253243aaa9cf011be83bef13d6a0e1ea915a3 /src/com/android/launcher3/InvariantDeviceProfile.java | |
parent | 58ecbe40f6e95d53b74adeeea3fd83a32cea4f38 (diff) | |
parent | 46a06da01cded4ba355381be41455f85f85369fa (diff) | |
download | android_packages_apps_Trebuchet-850de64c0d0985fb6fe9bbe7c276370c8b13c839.tar.gz android_packages_apps_Trebuchet-850de64c0d0985fb6fe9bbe7c276370c8b13c839.tar.bz2 android_packages_apps_Trebuchet-850de64c0d0985fb6fe9bbe7c276370c8b13c839.zip |
Merge "Fixing other missing cases of truncated sorts." into ub-launcher3-burnaby-polish
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/InvariantDeviceProfile.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 688130723..9e46a84e7 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)); } }); |