Change actions view disabling logic

1. Introduces "central task" - the task relating to the actions view
2. Decouple the overlay and actions view
3. Undo filter of taskViewType == SINGLE for overlay as it can be enabled for split tasks as well

Bug: 402351284
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTest (attached abtd run)
Test: OverviewMenuImageTest (attached abtd run)
Change-Id: Id7bc5c9c6620183d91e99d9dc5d2980eb8e3ec36
This commit is contained in:
Uwais Ashraf
2025-03-19 01:32:09 +00:00
parent b307f55a19
commit 7fd33ebde5
8 changed files with 85 additions and 29 deletions
@@ -859,7 +859,7 @@ public abstract class RecentsView<
*/
private boolean mAnyTaskHasBeenDismissed;
private final RecentsViewModel mRecentsViewModel;
protected final RecentsViewModel mRecentsViewModel;
private final RecentsViewModelHelper mHelper;
protected final RecentsViewUtils mUtils = new RecentsViewUtils(this);
protected final RecentsDismissUtils mDismissUtils = new RecentsDismissUtils(this);
@@ -1595,7 +1595,7 @@ public abstract class RecentsView<
/**
* Returns true if the given TaskView is in expected scroll position.
*/
public boolean isTaskInExpectedScrollPosition(TaskView taskView) {
public boolean isTaskInExpectedScrollPosition(@NonNull TaskView taskView) {
return getScrollForPage(indexOfChild(taskView))
== getPagedOrientationHandler().getPrimaryScroll(this);
}
@@ -5993,6 +5993,9 @@ public abstract class RecentsView<
updateCurrentTaskActionsVisibility();
loadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
updateEnabledOverlays();
if (enableRefactorTaskThumbnail()) {
mUtils.updateCentralTask();
}
}
@Override