Merge "Fix Overview screenshot bug in fake landscape" into tm-qpr-dev am: a930633884

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18590120

Change-Id: I5cc50d242590853272bdfa4a4a0b1cfea94343ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeremy Sim
2022-05-26 02:20:22 +00:00
committed by Automerger Merge Worker
@@ -16,7 +16,6 @@
package com.android.quickstep.views;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;
import static com.android.quickstep.views.TaskThumbnailView.DIM_ALPHA;
@@ -245,17 +244,9 @@ public class TaskMenuView extends AbstractFloatingView implements OnScrollChange
LayoutParams lp = (LayoutParams) menuOptionView.getLayoutParams();
mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp,
menuOptionView, mActivity.getDeviceProfile());
menuOptionView.setOnClickListener(view -> {
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
RecentsView recentsView = mTaskView.getRecentsView();
recentsView.switchToScreenshot(null,
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
false /* shouldPip */,
() -> menuOption.onClick(view)));
} else {
menuOption.onClick(view);
}
});
// Set an onClick listener on each menu option. The onClick method is responsible for
// ending LiveTile mode on the thumbnail if needed.
menuOptionView.setOnClickListener(menuOption::onClick);
mOptionLayout.addView(menuOptionView);
}