Merge "Don't show tasks shown in taskbar within overflow UI" into main
This commit is contained in:
commit
5917e69fa3
4 files changed
+20
-13
No files matched your search
@@ -293,7 +293,7 @@ public class TaskbarManagerImpl implements DisplayDecorationListener {
|
||||
// get pinned tasks - we care about all tasks, not just the one moved to the front
|
||||
Set<Integer> taskbarPinnedTasks =
|
||||
entry.getValue().getControllers().taskbarViewController
|
||||
.getTaskIdsForPinnedApps();
|
||||
.getShownTaskIds();
|
||||
|
||||
// filter out tasks already marked as perceptible
|
||||
taskbarPinnedTasks.removeAll(mPerceptibleTasks);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class TaskbarViewCallbacks {
|
||||
mTaskbarView.getTaskbarOverflowView().getIsActive());
|
||||
}
|
||||
mControllers.keyboardQuickSwitchController.toggleQuickSwitchViewForTaskbar(
|
||||
mControllers.taskbarViewController.getTaskIdsForPinnedApps(),
|
||||
mControllers.taskbarViewController.getShownTaskIds(),
|
||||
this::onKeyboardQuickSwitchViewClosed);
|
||||
}
|
||||
|
||||
|
||||
@@ -781,21 +781,25 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A set of Task ids of running apps that are pinned in the taskbar.
|
||||
* @return A set of Task ids shown in the taskbar - includes task ID for running tasks of pinned
|
||||
* apps, and standalone running tasks.
|
||||
*/
|
||||
protected Set<Integer> getTaskIdsForPinnedApps() {
|
||||
protected Set<Integer> getShownTaskIds() {
|
||||
if (!ENABLE_TASKBAR_OVERFLOW.isTrue()) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
Set<Integer> pinnedAppsWithTasks = new HashSet<>();
|
||||
Set<Integer> shownTasks = new HashSet<>();
|
||||
for (View iconView : getIconViews()) {
|
||||
if (iconView instanceof BubbleTextView btv
|
||||
&& btv.getTag() instanceof TaskItemInfo itemInfo) {
|
||||
pinnedAppsWithTasks.add(itemInfo.getTaskId());
|
||||
if (iconView instanceof BubbleTextView btv) {
|
||||
if (btv.getTag() instanceof TaskItemInfo itemInfo) {
|
||||
shownTasks.add(itemInfo.getTaskId());
|
||||
} else if (btv.getTag() instanceof SingleTask task) {
|
||||
shownTasks.add(task.getTask().getKey().id);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pinnedAppsWithTasks;
|
||||
return shownTasks;
|
||||
}
|
||||
|
||||
private void updateRunningState(BubbleTextView btv) {
|
||||
|
||||
Reference in new issue
Block a user