mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Launch initial split from taskbar in overview app menu
* Consolidated init calls in SplitSelectStateController * Also add support to launch from taskbar all apps * Add logic in SplitSelectStateController to know whether or not we need to dismiss existing TaskView vs relying on mSplitHiddenTaskView null check * Default click handling for SplitShortcut is to start split selection mode Bug: 251747761 Test: Initiated split from smart actions, thumbnail app icon, home, taskbar in overview, all apps. Saw it choose the latest thumbnail Change-Id: Ib4f64e619c97615af458a19a9c0efd86c92979d9
This commit is contained in:
@@ -21,11 +21,15 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -190,4 +194,35 @@ public final class SplitConfigurationOptions {
|
||||
return position == STAGE_POSITION_TOP_OR_LEFT ? STAGE_POSITION_BOTTOM_OR_RIGHT
|
||||
: STAGE_POSITION_TOP_OR_LEFT;
|
||||
}
|
||||
|
||||
public static class SplitSelectSource {
|
||||
|
||||
/** Keep in sync w/ ActivityTaskManager#INVALID_TASK_ID (unreference-able) */
|
||||
private static final int INVALID_TASK_ID = -1;
|
||||
|
||||
public final View view;
|
||||
public final Drawable drawable;
|
||||
public final Intent intent;
|
||||
public final SplitPositionOption position;
|
||||
public final ItemInfo itemInfo;
|
||||
public final StatsLogManager.EventEnum splitEvent;
|
||||
/** Represents the taskId of the first app to start in split screen */
|
||||
public int alreadyRunningTaskId = INVALID_TASK_ID;
|
||||
/**
|
||||
* If {@code true}, animates the view represented by {@link #alreadyRunningTaskId} into the
|
||||
* split placeholder view
|
||||
*/
|
||||
public boolean animateCurrentTaskDismissal;
|
||||
|
||||
public SplitSelectSource(View view, Drawable drawable, Intent intent,
|
||||
SplitPositionOption position, ItemInfo itemInfo,
|
||||
StatsLogManager.EventEnum splitEvent) {
|
||||
this.view = view;
|
||||
this.drawable = drawable;
|
||||
this.intent = intent;
|
||||
this.position = position;
|
||||
this.itemInfo = itemInfo;
|
||||
this.splitEvent = splitEvent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user