Add notification dots and popup menu notification support to the taskbar.

- Added support for notification dots
- Added support for notifications in popup menu
- Added support for dismissing notifications from the popup menu

Bug: 198438631
Test: long pressed launcher and taskbar icons, clicked notifications, clicked shortcuts
Change-Id: I7c981e60a82b4d6ce28332d804bbbfb5eb89c6a8
This commit is contained in:
Schneider Victor-tulias
2021-10-19 14:47:23 -07:00
parent 54def6f083
commit 5173fd8090
14 changed files with 375 additions and 151 deletions

View File

@@ -36,6 +36,7 @@ import com.android.launcher3.model.data.FolderInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.uioverrides.ApiWrapper;
import com.android.launcher3.util.LauncherBindableItemsContainer;
import com.android.launcher3.views.ActivityContext;
/**
@@ -330,4 +331,14 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
// Consider the overall visibility
return getVisibility() == VISIBLE;
}
protected void mapOverItems(LauncherBindableItemsContainer.ItemOperator op) {
// map over all the shortcuts on the taskbar
for (int i = 0; i < getChildCount(); i++) {
View item = getChildAt(i);
if (op.evaluate((ItemInfo) item.getTag(), item)) {
return;
}
}
}
}