Load and draw Recent/Running tasks that aren't in Hotseat
- Re-support GroupTask as a tag on TaskbarView BubbleTextViews - Can tap to launch (startActivityFromRecents) or drag and drop - Move divider when enable_recents_in_taskbar is true Behavior: - While in Desktop mode, all open tasks show up in TaskbarView, either in the Hotseat section or the Running apps section past the divider. Each one also has a running line indicator. - While in Fullscreen mode, up to 2 Recent apps that are not part of Hotseat will be added to the right of the divider. Flag: com.android.launcher3.enable_recents_in_taskbar Test: TaskbarRecentAppsControllerTest Bug: 315354060 Change-Id: I2e2870cca434b51f276a701860edb32069109159
This commit is contained in:
@@ -430,10 +430,21 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
setDownloadStateContentDescription(info, info.getProgressLevel());
|
||||
}
|
||||
|
||||
/**
|
||||
* Directly set the icon and label.
|
||||
*/
|
||||
@UiThread
|
||||
public void applyIconAndLabel(Drawable icon, CharSequence label) {
|
||||
applyCompoundDrawables(icon);
|
||||
setText(label);
|
||||
setContentDescription(label);
|
||||
}
|
||||
|
||||
/** Updates whether the app this view represents is currently running. */
|
||||
@UiThread
|
||||
public void updateRunningState(RunningAppState runningAppState) {
|
||||
mRunningAppState = runningAppState;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
protected void setItemInfo(ItemInfoWithIcon itemInfo) {
|
||||
@@ -1291,13 +1302,4 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
public boolean canShowLongPressPopup() {
|
||||
return getTag() instanceof ItemInfo && ShortcutUtil.supportsShortcuts((ItemInfo) getTag());
|
||||
}
|
||||
|
||||
/** Returns the package name of the app this icon represents. */
|
||||
public String getTargetPackageName() {
|
||||
Object tag = getTag();
|
||||
if (tag instanceof ItemInfo itemInfo) {
|
||||
return itemInfo.getTargetPackage();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user