summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-08-18 15:01:11 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-08-18 15:08:22 -0700
commit8f90dcff37f13bbbc3f875f1c9521cbc9745c673 (patch)
treeee32f110a1abcfeeb7c8de58fb3de7a2ba56a8e2 /src/com/android/launcher3/CellLayout.java
parentad9a25d4bed47a94f89719097158c465e9aaee3c (diff)
downloadandroid_packages_apps_Trebuchet-8f90dcff37f13bbbc3f875f1c9521cbc9745c673.tar.gz
android_packages_apps_Trebuchet-8f90dcff37f13bbbc3f875f1c9521cbc9745c673.tar.bz2
android_packages_apps_Trebuchet-8f90dcff37f13bbbc3f875f1c9521cbc9745c673.zip
Removing wrong dead code around direction matching
Change-Id: Ic8349fcac4bfe6222b1cbf26e8cbb1810dc32298
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index ee2131398..baccfd157 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -1356,12 +1356,9 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
// and that passed in.
int curDirectionScore = direction[0] * curDirection[0] +
direction[1] * curDirection[1];
- boolean exactDirectionOnly = false;
- boolean directionMatches = direction[0] == curDirection[0] &&
- direction[0] == curDirection[0];
- if ((directionMatches || !exactDirectionOnly) &&
- Float.compare(distance, bestDistance) < 0 || (Float.compare(distance,
- bestDistance) == 0 && curDirectionScore > bestDirectionScore)) {
+ if (Float.compare(distance, bestDistance) < 0 ||
+ (Float.compare(distance, bestDistance) == 0
+ && curDirectionScore > bestDirectionScore)) {
bestDistance = distance;
bestDirectionScore = curDirectionScore;
bestXY[0] = x;