diff options
author | Winson <winsonc@google.com> | 2015-09-29 17:39:37 -0700 |
---|---|---|
committer | Winson <winsonc@google.com> | 2015-09-29 17:39:37 -0700 |
commit | e993c4b2757209b1e2e0408eaa2e850fe95e7b63 (patch) | |
tree | cd1c3dbacdbe1fbde7b8c79a3ad34ae41cfffeb6 | |
parent | a3b240d32bf9e65b4ba80b28ad28eef0a1fd677b (diff) | |
parent | 850de64c0d0985fb6fe9bbe7c276370c8b13c839 (diff) | |
download | android_packages_apps_Trebuchet-e993c4b2757209b1e2e0408eaa2e850fe95e7b63.tar.gz android_packages_apps_Trebuchet-e993c4b2757209b1e2e0408eaa2e850fe95e7b63.tar.bz2 android_packages_apps_Trebuchet-e993c4b2757209b1e2e0408eaa2e850fe95e7b63.zip |
resolved conflicts for 850de64c to ub-launcher3-master
Change-Id: Ica4893082f03afe76abd42dca44016eb9e436c35
-rw-r--r-- | src/com/android/launcher3/InvariantDeviceProfile.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 6 |
2 files changed, 5 insertions, 5 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)); } }); diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 27cfd632e..97a55590b 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -2445,11 +2445,11 @@ public class LauncherModel extends BroadcastReceiver lhs.cellY * screenCols + lhs.cellX); long rr = (rhs.screenId * screenCellCount + rhs.cellY * screenCols + rhs.cellX); - return (int) (lr - rr); + return Long.compare(lr, rr); } case LauncherSettings.Favorites.CONTAINER_HOTSEAT: { // We currently use the screen id as the rank - return (int) (lhs.screenId - rhs.screenId); + return Long.compare(lhs.screenId, rhs.screenId); } default: if (ProviderConfig.IS_DOGFOOD_BUILD) { @@ -2460,7 +2460,7 @@ public class LauncherModel extends BroadcastReceiver } } else { // Between containers, order by hotseat, desktop - return (int) (lhs.container - rhs.container); + return Long.compare(lhs.container, rhs.container); } } }); |