Fallback to predefined orientation handler if recents view isn't available am: ca755c3846

Change-Id: I237a1ec06473ece818ffa43bc148426d820d0d3d
This commit is contained in:
Automerger Merge Worker
2020-03-06 21:07:29 +00:00
@@ -41,6 +41,9 @@ import android.view.MotionEvent;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.touch.LandscapePagedViewHandler;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.touch.PortraitPagedViewHandler;
import com.android.launcher3.util.ObjectWrapper;
import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory;
import com.android.quickstep.GestureState.GestureEndTarget;
@@ -470,8 +473,13 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa
HomeAnimationFactory factory = new HomeAnimationFactory() {
@Override
public RectF getWindowTargetRect() {
PagedOrientationHandler orientationHandler = mRecentsView != null
? mRecentsView.getPagedOrientationHandler()
: (mDp.isLandscape
? new LandscapePagedViewHandler()
: new PortraitPagedViewHandler());
return HomeAnimationFactory
.getDefaultWindowTargetRect(mRecentsView.getPagedOrientationHandler(), mDp);
.getDefaultWindowTargetRect(orientationHandler, mDp);
}
@Override