Update equals logic for LogEntry

The equals logic was depending on exact equality and that was flaky
because of float precision. Changed the logic so it'd accept points that
are closer than 1px as the same.

Fix: 294251061
Test: atest android.server.wm.DragDropCompatTest#testOverNowhere
Change-Id: Ibac168c3ddf39aa6c05eda2a879c30c0622abfdf
Merged-Id: Ibac168c3ddf39aa6c05eda2a879c30c0622abfdf
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/DragDropTest.java b/tests/framework/base/windowmanager/src/android/server/wm/DragDropTest.java
index 40a11b1..4ae4604 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/DragDropTest.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/DragDropTest.java
@@ -149,7 +149,8 @@
             }
             final LogEntry other = (LogEntry) obj;
             return view == other.view && action == other.action
-                    && x == other.x && y == other.y
+                    // Use tolerance in case mInvCompatScale is not 1.
+                    && Math.abs(x - other.x) < 1f && Math.abs(y - other.y) < 1f
                     && compareParcelables(clipData, other.clipData)
                     && compareParcelables(clipDescription, other.clipDescription)
                     && localState == other.localState