Folder support in Taskbar

- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
This commit is contained in:
Tony Wickham
2021-02-02 17:12:08 -08:00
parent 1906cc33f9
commit 7ba547cd2d
12 changed files with 265 additions and 25 deletions

View File

@@ -206,15 +206,19 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
protected boolean findActiveController(MotionEvent ev) {
mActiveController = null;
if ((mTouchDispatchState & (TOUCH_DISPATCHING_FROM_VIEW_GESTURE_REGION
| TOUCH_DISPATCHING_FROM_PROXY)) == 0) {
// Only look for controllers if we are not dispatching from gesture area and proxy is
// not active
if (canFindActiveController()) {
mActiveController = findControllerToHandleTouch(ev);
}
return mActiveController != null;
}
protected boolean canFindActiveController() {
// Only look for controllers if we are not dispatching from gesture area and proxy is
// not active
return (mTouchDispatchState & (TOUCH_DISPATCHING_FROM_VIEW_GESTURE_REGION
| TOUCH_DISPATCHING_FROM_PROXY)) == 0;
}
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
// Shortcuts can appear above folder