Fix tracking window being slightly off when swiping from an app

Test: swipe up from an app in landscape, seascape, and portrait,
and verify the window tracks with the finger 1:1 until pullback

Bug: 149934536
Change-Id: Ia469877e7152c8135e0b9153f69c191ba86cbd14
This commit is contained in:
Tony Wickham committed 2020-06-25 11:51:28 -07:00
1 parent 7e3d07fc77
commit f0a1b2ccd8
5 files changed
+23 -1

No files matched your search

@@ -18,9 +18,11 @@ package com.android.launcher3.touch;
import android.content.res.Resources;
import android.graphics.PointF;
import android.graphics.Rect;
import android.view.Surface;
import android.view.View;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Utilities;
public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
@@ -77,4 +79,9 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
view.setTranslationX(0);
view.setTranslationY(translation);
}
@Override
public int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect) {
return dp.widthPx - rect.right;
}
}