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
2020-06-24 20:52:26 -07:00
parent 7e3d07fc77
commit f0a1b2ccd8
5 changed files with 23 additions and 1 deletions

View File

@@ -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;
}
}