Merge "Using the activity size for swipe-dow animation in fallback+multiWindow mode" into ub-launcher3-edmonton
This commit is contained in:
commit
d60c00cc87
|
@ -66,4 +66,9 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity> {
|
|||
LayoutUtils.calculateFallbackTaskSize(getContext(), dp, outRect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseMultiWindowTaskSizeStrategy() {
|
||||
// Just use the activity task size for multi-window as well.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import com.android.launcher3.R;
|
|||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.quickstep.views.TaskThumbnailView;
|
||||
import com.android.systemui.shared.recents.utilities.RectFEvaluator;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
|
@ -135,7 +136,7 @@ public class ClipAnimationHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public void fromTaskThumbnailView(TaskThumbnailView ttv) {
|
||||
public void fromTaskThumbnailView(TaskThumbnailView ttv, RecentsView rv) {
|
||||
BaseDraggingActivity activity = BaseDraggingActivity.fromContext(ttv.getContext());
|
||||
BaseDragLayer dl = activity.getDragLayer();
|
||||
|
||||
|
@ -144,7 +145,7 @@ public class ClipAnimationHelper {
|
|||
mHomeStackBounds.set(0, 0, dl.getWidth(), dl.getHeight());
|
||||
mHomeStackBounds.offset(pos[0], pos[1]);
|
||||
|
||||
if (activity.isInMultiWindowModeCompat()) {
|
||||
if (rv.shouldUseMultiWindowTaskSizeStrategy()) {
|
||||
// TODO: Fetch multi-window target bounds from system-ui
|
||||
DeviceProfile fullDp = activity.getDeviceProfile().getFullScreenProfile();
|
||||
// Use availableWidthPx and availableHeightPx instead of widthPx and heightPx to
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TaskViewDrawable extends Drawable {
|
|||
|
||||
mThumbnailView = tv.getThumbnail();
|
||||
mClipAnimationHelper = new ClipAnimationHelper();
|
||||
mClipAnimationHelper.fromTaskThumbnailView(mThumbnailView);
|
||||
mClipAnimationHelper.fromTaskThumbnailView(mThumbnailView, parent);
|
||||
}
|
||||
|
||||
public void setProgress(float progress) {
|
||||
|
|
|
@ -138,4 +138,9 @@ public class LauncherRecentsView extends RecentsView<Launcher> {
|
|||
}
|
||||
super.onTaskLaunched(success);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseMultiWindowTaskSizeStrategy() {
|
||||
return mActivity.isInMultiWindowModeCompat();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1098,6 +1098,8 @@ public abstract class RecentsView<T extends BaseActivity>
|
|||
return mPendingAnimation;
|
||||
}
|
||||
|
||||
public abstract boolean shouldUseMultiWindowTaskSizeStrategy();
|
||||
|
||||
protected void onTaskLaunched(boolean success) {
|
||||
resetTaskVisuals();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue