Draw leave-behind circle after pressing taskbar overflow button

This CL does not include animating app icons / leave behind circle.

Bug: 376281549
Flag: com.android.launcher3.taskbar_overflow
Test: press the oveflow button, dismiss KQS in different ways
Change-Id: I1f830c6859a5be4fb5947ec38e6d30da79138b7f
This commit is contained in:
Artsiom Mitrokhin
2024-10-31 15:17:15 -04:00
parent d626cdd727
commit ccd96a1868
3 changed files with 90 additions and 18 deletions
@@ -54,6 +54,8 @@ public final class KeyboardQuickSwitchController implements
public static final int MAX_TASKS = 6;
@NonNull private final ControllerCallbacks mControllerCallbacks = new ControllerCallbacks();
// Callback used to notify when the KQS view is closed.
@Nullable private Runnable mOnClosed;
// Initialized on init
@Nullable private RecentsModel mModel;
@@ -112,8 +114,12 @@ public final class KeyboardQuickSwitchController implements
* Opens or closes the view in response to taskbar action. The view shows a filtered list of
* tasks.
* @param taskIdsToExclude A list of tasks to exclude in the opened view.
* @param onClosed A callback used to notify when the KQS view is closed.
*/
void toggleQuickSwitchViewForTaskbar(@NonNull Set<Integer> taskIdsToExclude) {
void toggleQuickSwitchViewForTaskbar(@NonNull Set<Integer> taskIdsToExclude,
@NonNull Runnable onClosed) {
mOnClosed = onClosed;
// Close the view if its shown, and was opened from the taskbar.
if (mQuickSwitchViewController != null
&& !mQuickSwitchViewController.isCloseAnimationRunning()
@@ -264,6 +270,10 @@ public final class KeyboardQuickSwitchController implements
return;
}
mQuickSwitchViewController.closeQuickSwitchView(animate);
if (mOnClosed != null) {
mOnClosed.run();
mOnClosed = null;
}
}
/**