Loading quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +7 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_SPLIT_TRANS import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION; import android.util.FloatProperty; import android.util.Pair; import androidx.annotation.NonNull; Loading Loading @@ -101,11 +102,13 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR)); PagedOrientationHandler orientationHandler = ((RecentsView) mLauncher.getOverviewPanel()).getPagedOrientationHandler(); FloatProperty taskViewsFloat = orientationHandler.getSplitSelectTaskOffset( Pair<FloatProperty, FloatProperty> taskViewsFloat = orientationHandler.getSplitSelectTaskOffset( TASK_PRIMARY_SPLIT_TRANSLATION, TASK_SECONDARY_SPLIT_TRANSLATION, mLauncher.getDeviceProfile()); setter.setFloat(mRecentsView, taskViewsFloat, setter.setFloat(mRecentsView, taskViewsFloat.first, toState.getSplitSelectTranslation(mLauncher), LINEAR); setter.setFloat(mRecentsView, taskViewsFloat.second, 0, LINEAR); setter.setFloat(mRecentsView, getContentAlphaProperty(), toState.overviewUi ? 1 : 0, config.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT)); Loading src/com/android/launcher3/touch/LandscapePagedViewHandler.java +4 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } } src/com/android/launcher3/touch/PagedOrientationHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); /** Loading src/com/android/launcher3/touch/PortraitPagedViewHandler.java +6 −5 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } } } Loading
quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +7 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_SPLIT_TRANS import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION; import android.util.FloatProperty; import android.util.Pair; import androidx.annotation.NonNull; Loading Loading @@ -101,11 +102,13 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR)); PagedOrientationHandler orientationHandler = ((RecentsView) mLauncher.getOverviewPanel()).getPagedOrientationHandler(); FloatProperty taskViewsFloat = orientationHandler.getSplitSelectTaskOffset( Pair<FloatProperty, FloatProperty> taskViewsFloat = orientationHandler.getSplitSelectTaskOffset( TASK_PRIMARY_SPLIT_TRANSLATION, TASK_SECONDARY_SPLIT_TRANSLATION, mLauncher.getDeviceProfile()); setter.setFloat(mRecentsView, taskViewsFloat, setter.setFloat(mRecentsView, taskViewsFloat.first, toState.getSplitSelectTranslation(mLauncher), LINEAR); setter.setFloat(mRecentsView, taskViewsFloat.second, 0, LINEAR); setter.setFloat(mRecentsView, getContentAlphaProperty(), toState.overviewUi ? 1 : 0, config.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT)); Loading
src/com/android/launcher3/touch/LandscapePagedViewHandler.java +4 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } }
src/com/android/launcher3/touch/PagedOrientationHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); /** Loading
src/com/android/launcher3/touch/PortraitPagedViewHandler.java +6 −5 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } } }