Refactor edge of screen detection code.
There were two resources that both defined the edge of the screen.
Change-Id: I82ab553cc3123ef54ff1f0c692d29f3678ad04ac
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 9a42513..0540249 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -316,7 +316,6 @@
private UserEventDispatcher mUserEventDispatcher;
private float mLastDispatchTouchEventX = 0.0f;
- private float mEdgeOfScreenThresholdPx = 0.0f;
public ViewGroupFocusHelper mFocusHandler;
private boolean mRotationEnabled = false;
@@ -395,9 +394,6 @@
setContentView(R.layout.launcher);
- mEdgeOfScreenThresholdPx = getResources()
- .getDimensionPixelSize(R.dimen.edge_of_screen_threshold);
-
setupViews();
mDeviceProfile.layout(this, false /* notifyListeners */);
mExtractedColors = new ExtractedColors();
@@ -2718,8 +2714,8 @@
}
- boolean ignoreLongPressToOverview = mDeviceProfile.shouldIgnoreLongPressToOverview(
- mLastDispatchTouchEventX, mEdgeOfScreenThresholdPx);
+ boolean ignoreLongPressToOverview =
+ mDeviceProfile.shouldIgnoreLongPressToOverview(mLastDispatchTouchEventX);
if (v instanceof Workspace) {
if (!mWorkspace.isInOverviewMode()) {