From a13715bb931c0211fdadd95fbbfdd37720e6e350 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Thu, 24 Sep 2020 22:19:16 -0700 Subject: [PATCH] [Live Tile] Switch to screenshot when any task menu option is selected - App info - Split screen - Pause app Fixes: 169385194 Test: Manual Change-Id: I7df8ac7dd89c8c7ae75d8e2e4207cd32ca7b10ea --- .../com/android/quickstep/views/TaskMenuView.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/src/com/android/quickstep/views/TaskMenuView.java index d47eba6408..4aff7e3211 100644 --- a/quickstep/src/com/android/quickstep/views/TaskMenuView.java +++ b/quickstep/src/com/android/quickstep/views/TaskMenuView.java @@ -16,6 +16,7 @@ package com.android.quickstep.views; +import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.quickstep.views.TaskThumbnailView.DIM_ALPHA; import android.animation.Animator; @@ -229,7 +230,16 @@ public class TaskMenuView extends AbstractFloatingView { menuOptionView.findViewById(R.id.icon), menuOptionView.findViewById(R.id.text)); LayoutParams lp = (LayoutParams) menuOptionView.getLayoutParams(); mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp); - menuOptionView.setOnClickListener(menuOption); + menuOptionView.setOnClickListener(view -> { + if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { + RecentsView recentsView = mTaskView.getRecentsView(); + recentsView.switchToScreenshot(null, + () -> recentsView.finishRecentsAnimation(true /* toRecents */, + () -> menuOption.onClick(view))); + } else { + menuOption.onClick(view); + } + }); mOptionLayout.addView(menuOptionView); }