Add system shortcuts when long pressing recent icon

We add a floating view for the menu that aligns with the task icon.

If available, the following shortcuts are present:
- Widgets
- App info
- Install (for instant apps)

It is designed to be straightforward to add to this list.

Bug: 70294936

Change-Id: I56c1098353d09fc564e0e92e59e4fcf692e486ba
This commit is contained in:
Tony Wickham
2017-12-14 18:38:25 -08:00
parent 9328a51271
commit 2fae2a0e9c
9 changed files with 426 additions and 13 deletions

View File

@@ -43,7 +43,8 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
TYPE_WIDGET_RESIZE_FRAME,
TYPE_WIDGETS_FULL_SHEET,
TYPE_QUICKSTEP_PREVIEW,
TYPE_ON_BOARD_POPUP
TYPE_ON_BOARD_POPUP,
TYPE_TASK_MENU
})
@Retention(RetentionPolicy.SOURCE)
public @interface FloatingViewType {}
@@ -54,10 +55,11 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
public static final int TYPE_WIDGETS_FULL_SHEET = 1 << 4;
public static final int TYPE_QUICKSTEP_PREVIEW = 1 << 5;
public static final int TYPE_ON_BOARD_POPUP = 1 << 6;
public static final int TYPE_TASK_MENU = 1 << 7;
public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP
| TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP;
| TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_TASK_MENU;
// Type of popups which should be kept open during launcher rebind
public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET