Merge "Resets taskSplitTranslation of inactive orientation" into sc-v2-dev am: c5f18aa980 am: b73701ad92
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16343601 Change-Id: I6e6a0ab952578193ca4ded1c2e7cf83f1897f070
This commit is contained in:
commit
ed995a3e68
4 files changed
+20
-14
No files matched your search
@@ -36,6 +36,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Pair;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.Surface;
|
||||
import android.view.VelocityTracker;
|
||||
@@ -462,8 +463,8 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
|
||||
DeviceProfile deviceProfile) {
|
||||
return primary;
|
||||
public Pair<FloatProperty, FloatProperty> getSplitSelectTaskOffset(FloatProperty primary,
|
||||
FloatProperty secondary, DeviceProfile deviceProfile) {
|
||||
return new Pair<>(primary, secondary);
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Pair;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
import android.view.View;
|
||||
@@ -113,8 +114,8 @@ public interface PagedOrientationHandler {
|
||||
float getSecondaryValue(float x, float y);
|
||||
|
||||
boolean isLayoutNaturalToLauncher();
|
||||
FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
|
||||
DeviceProfile deviceProfile);
|
||||
Pair<FloatProperty, FloatProperty> getSplitSelectTaskOffset(FloatProperty primary,
|
||||
FloatProperty secondary, DeviceProfile deviceProfile);
|
||||
int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect);
|
||||
List<SplitPositionOption> getSplitPositionOptions(DeviceProfile dp);
|
||||
/**
|
||||
|
||||
@@ -35,6 +35,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Pair;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.Surface;
|
||||
import android.view.VelocityTracker;
|
||||
@@ -571,12 +572,12 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
|
||||
DeviceProfile dp) {
|
||||
if (dp.isLandscape) { // or seascape
|
||||
return primary;
|
||||
public Pair<FloatProperty, FloatProperty> getSplitSelectTaskOffset(FloatProperty primary,
|
||||
FloatProperty secondary, DeviceProfile deviceProfile) {
|
||||
if (deviceProfile.isLandscape) { // or seascape
|
||||
return new Pair<>(primary, secondary);
|
||||
} else {
|
||||
return secondary;
|
||||
return new Pair<>(secondary, primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user