Loading quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +1 −1 Original line number Diff line number Diff line Loading @@ -323,7 +323,7 @@ public class FallbackRecentsView<CONTAINER_TYPE extends Context & RecentsViewCon } @Override protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { return !mContainer.isInState(OVERVIEW_SPLIT_SELECT); } Loading quickstep/src/com/android/quickstep/views/DesktopTaskView.kt +18 −16 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu this, R.layout.task_thumbnail_deprecated, VIEW_POOL_MAX_SIZE, VIEW_POOL_INITIAL_SIZE VIEW_POOL_INITIAL_SIZE, ) private val tempPointF = PointF() private val tempRect = Rect() Loading @@ -80,7 +80,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu setTint( resources.getColor( android.R.color.system_neutral2_300, context.theme context.theme, ) ) } Loading @@ -92,8 +92,8 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu ResourcesCompat.getDrawable( context.resources, R.drawable.ic_desktop_with_bg, context.theme ) context.theme, ), ) setText(resources.getText(R.string.recent_task_desktop)) } Loading @@ -104,7 +104,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu fun bind( tasks: List<Task>, orientedState: RecentsOrientedState, taskOverlayFactory: TaskOverlayFactory taskOverlayFactory: TaskOverlayFactory, ) { if (DEBUG) { val sb = StringBuilder() Loading @@ -126,7 +126,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu snapshotView, // Add snapshotView to the front after initial views e.g. icon and // background. childCountAtInflation childCountAtInflation, ) TaskContainer( this, Loading @@ -137,7 +137,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu SplitConfigurationOptions.STAGE_POSITION_UNDEFINED, digitalWellBeingToast = null, showWindowsView = null, taskOverlayFactory taskOverlayFactory, ) } taskContainers.forEach { it.bind() } Loading @@ -159,12 +159,12 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu override fun updateTaskSize( lastComputedTaskSize: Rect, lastComputedGridTaskSize: Rect, lastComputedCarouselTaskSize: Rect lastComputedCarouselTaskSize: Rect, ) { super.updateTaskSize( lastComputedTaskSize, lastComputedGridTaskSize, lastComputedCarouselTaskSize lastComputedCarouselTaskSize, ) if (taskContainers.isEmpty()) { return Loading @@ -186,7 +186,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu Log.d( TAG, "onMeasure: container=[$containerWidth,$containerHeight]" + "window=[$windowWidth,$windowHeight] scale=[$scaleWidth,$scaleHeight]" "window=[$windowWidth,$windowHeight] scale=[$scaleWidth,$scaleHeight]", ) } Loading Loading @@ -218,7 +218,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu Log.d( TAG, "onMeasure: task=${it.task.key} size=[$width,$height]" + " margin=[$leftMargin,$topMargin]" " margin=[$leftMargin,$topMargin]", ) } } Loading Loading @@ -252,7 +252,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "launchDesktopFromRecents", taskIds.contentToString() taskIds.contentToString(), ) val endCallback = RunnableList() val desktopController = recentsView.desktopRecentsController Loading @@ -262,7 +262,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu } Log.d( TAG, "launchTaskWithDesktopController: ${taskIds.contentToString()}, withRemoteTransition: $animated" "launchTaskWithDesktopController: ${taskIds.contentToString()}, withRemoteTransition: $animated", ) // Callbacks get run from recentsView for case when recents animation already running Loading @@ -274,11 +274,13 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu override fun launchWithoutAnimation( isQuickSwitch: Boolean, callback: (launched: Boolean) -> Unit callback: (launched: Boolean) -> Unit, ) = launchTaskWithDesktopController(animated = false)?.add { callback(true) } ?: callback(false) // Desktop tile can't be in split screen override fun confirmSecondSplitSelectApp(): Boolean = false // Return true when Task cannot be launched as fullscreen (i.e. in split select state) to skip // putting DesktopTaskView to split as it's not supported. override fun confirmSecondSplitSelectApp(): Boolean = recentsView?.canLaunchFullscreenTask() != true // TODO(b/330685808) support overlay for Screenshot action override fun setOverlayEnabled(overlayEnabled: Boolean) {} Loading quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher } @Override protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { if (FeatureFlags.enableSplitContextually()) { return !mSplitSelectStateController.isSplitSelectActive(); } else { Loading quickstep/src/com/android/quickstep/views/RecentsView.java +3 −20 Original line number Diff line number Diff line Loading @@ -235,6 +235,8 @@ import com.android.wm.shell.common.pip.IPipAnimationListener; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; import kotlin.Unit; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; Loading @@ -248,8 +250,6 @@ import java.util.Set; import java.util.function.Consumer; import java.util.stream.Collectors; import kotlin.Unit; /** * A list of recent tasks. * Loading Loading @@ -798,12 +798,6 @@ public abstract class RecentsView< @Nullable private DesktopRecentsTransitionController mDesktopRecentsTransitionController; /** * Keeps track of the desktop task. Optional and only present when the feature flag is enabled. */ @Nullable private DesktopTaskView mDesktopTaskView; private MultiWindowModeChangedListener mMultiWindowModeChangedListener = new MultiWindowModeChangedListener() { @Override Loading Loading @@ -1177,7 +1171,7 @@ public abstract class RecentsView< * * @return {@code true} if child TaskViews can be launched when user taps on them */ protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { return true; } Loading Loading @@ -1870,7 +1864,6 @@ public abstract class RecentsView< mFilterState.updateInstanceCountMap(taskGroups); // Clear out desktop view if it is set mDesktopTaskView = null; // Move Desktop Tasks to the end of the list if (enableLargeDesktopWindowingTile()) { Loading Loading @@ -1909,7 +1902,6 @@ public abstract class RecentsView< .toList(); ((DesktopTaskView) taskView).bind(nonMinimizedTasks, mOrientationState, mTaskOverlayFactory); mDesktopTaskView = (DesktopTaskView) taskView; } else { Task task = groupTask.task1.key.id == stagedTaskIdToBeRemoved ? groupTask.task2 : groupTask.task1; Loading Loading @@ -4970,7 +4962,6 @@ public abstract class RecentsView< mSplitSelectStateController.setAnimateCurrentTaskDismissal( true /*animateCurrentTaskDismissal*/); mSplitHiddenTaskViewIndex = indexOfChild(taskView); updateDesktopTaskVisibility(false /* visible */); } /** Loading @@ -4992,13 +4983,6 @@ public abstract class RecentsView< mSplitSelectStateController.setInitialTaskSelect(splitSelectSource.intent, splitSelectSource.position.stagePosition, splitSelectSource.getItemInfo(), splitSelectSource.splitEvent, splitSelectSource.alreadyRunningTaskId); updateDesktopTaskVisibility(false /* visible */); } private void updateDesktopTaskVisibility(boolean visible) { if (mDesktopTaskView != null) { mDesktopTaskView.setVisibility(visible ? VISIBLE : GONE); } } /** Loading Loading @@ -5208,7 +5192,6 @@ public abstract class RecentsView< mSplitHiddenTaskView.setThumbnailVisibility(VISIBLE, INVALID_TASK_ID); mSplitHiddenTaskView = null; } updateDesktopTaskVisibility(true /* visible */); } private void safeRemoveDragLayerView(@Nullable View viewToRemove) { Loading Loading
quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +1 −1 Original line number Diff line number Diff line Loading @@ -323,7 +323,7 @@ public class FallbackRecentsView<CONTAINER_TYPE extends Context & RecentsViewCon } @Override protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { return !mContainer.isInState(OVERVIEW_SPLIT_SELECT); } Loading
quickstep/src/com/android/quickstep/views/DesktopTaskView.kt +18 −16 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu this, R.layout.task_thumbnail_deprecated, VIEW_POOL_MAX_SIZE, VIEW_POOL_INITIAL_SIZE VIEW_POOL_INITIAL_SIZE, ) private val tempPointF = PointF() private val tempRect = Rect() Loading @@ -80,7 +80,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu setTint( resources.getColor( android.R.color.system_neutral2_300, context.theme context.theme, ) ) } Loading @@ -92,8 +92,8 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu ResourcesCompat.getDrawable( context.resources, R.drawable.ic_desktop_with_bg, context.theme ) context.theme, ), ) setText(resources.getText(R.string.recent_task_desktop)) } Loading @@ -104,7 +104,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu fun bind( tasks: List<Task>, orientedState: RecentsOrientedState, taskOverlayFactory: TaskOverlayFactory taskOverlayFactory: TaskOverlayFactory, ) { if (DEBUG) { val sb = StringBuilder() Loading @@ -126,7 +126,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu snapshotView, // Add snapshotView to the front after initial views e.g. icon and // background. childCountAtInflation childCountAtInflation, ) TaskContainer( this, Loading @@ -137,7 +137,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu SplitConfigurationOptions.STAGE_POSITION_UNDEFINED, digitalWellBeingToast = null, showWindowsView = null, taskOverlayFactory taskOverlayFactory, ) } taskContainers.forEach { it.bind() } Loading @@ -159,12 +159,12 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu override fun updateTaskSize( lastComputedTaskSize: Rect, lastComputedGridTaskSize: Rect, lastComputedCarouselTaskSize: Rect lastComputedCarouselTaskSize: Rect, ) { super.updateTaskSize( lastComputedTaskSize, lastComputedGridTaskSize, lastComputedCarouselTaskSize lastComputedCarouselTaskSize, ) if (taskContainers.isEmpty()) { return Loading @@ -186,7 +186,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu Log.d( TAG, "onMeasure: container=[$containerWidth,$containerHeight]" + "window=[$windowWidth,$windowHeight] scale=[$scaleWidth,$scaleHeight]" "window=[$windowWidth,$windowHeight] scale=[$scaleWidth,$scaleHeight]", ) } Loading Loading @@ -218,7 +218,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu Log.d( TAG, "onMeasure: task=${it.task.key} size=[$width,$height]" + " margin=[$leftMargin,$topMargin]" " margin=[$leftMargin,$topMargin]", ) } } Loading Loading @@ -252,7 +252,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "launchDesktopFromRecents", taskIds.contentToString() taskIds.contentToString(), ) val endCallback = RunnableList() val desktopController = recentsView.desktopRecentsController Loading @@ -262,7 +262,7 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu } Log.d( TAG, "launchTaskWithDesktopController: ${taskIds.contentToString()}, withRemoteTransition: $animated" "launchTaskWithDesktopController: ${taskIds.contentToString()}, withRemoteTransition: $animated", ) // Callbacks get run from recentsView for case when recents animation already running Loading @@ -274,11 +274,13 @@ class DesktopTaskView @JvmOverloads constructor(context: Context, attrs: Attribu override fun launchWithoutAnimation( isQuickSwitch: Boolean, callback: (launched: Boolean) -> Unit callback: (launched: Boolean) -> Unit, ) = launchTaskWithDesktopController(animated = false)?.add { callback(true) } ?: callback(false) // Desktop tile can't be in split screen override fun confirmSecondSplitSelectApp(): Boolean = false // Return true when Task cannot be launched as fullscreen (i.e. in split select state) to skip // putting DesktopTaskView to split as it's not supported. override fun confirmSecondSplitSelectApp(): Boolean = recentsView?.canLaunchFullscreenTask() != true // TODO(b/330685808) support overlay for Screenshot action override fun setOverlayEnabled(overlayEnabled: Boolean) {} Loading
quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher } @Override protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { if (FeatureFlags.enableSplitContextually()) { return !mSplitSelectStateController.isSplitSelectActive(); } else { Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +3 −20 Original line number Diff line number Diff line Loading @@ -235,6 +235,8 @@ import com.android.wm.shell.common.pip.IPipAnimationListener; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; import kotlin.Unit; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; Loading @@ -248,8 +250,6 @@ import java.util.Set; import java.util.function.Consumer; import java.util.stream.Collectors; import kotlin.Unit; /** * A list of recent tasks. * Loading Loading @@ -798,12 +798,6 @@ public abstract class RecentsView< @Nullable private DesktopRecentsTransitionController mDesktopRecentsTransitionController; /** * Keeps track of the desktop task. Optional and only present when the feature flag is enabled. */ @Nullable private DesktopTaskView mDesktopTaskView; private MultiWindowModeChangedListener mMultiWindowModeChangedListener = new MultiWindowModeChangedListener() { @Override Loading Loading @@ -1177,7 +1171,7 @@ public abstract class RecentsView< * * @return {@code true} if child TaskViews can be launched when user taps on them */ protected boolean canLaunchFullscreenTask() { public boolean canLaunchFullscreenTask() { return true; } Loading Loading @@ -1870,7 +1864,6 @@ public abstract class RecentsView< mFilterState.updateInstanceCountMap(taskGroups); // Clear out desktop view if it is set mDesktopTaskView = null; // Move Desktop Tasks to the end of the list if (enableLargeDesktopWindowingTile()) { Loading Loading @@ -1909,7 +1902,6 @@ public abstract class RecentsView< .toList(); ((DesktopTaskView) taskView).bind(nonMinimizedTasks, mOrientationState, mTaskOverlayFactory); mDesktopTaskView = (DesktopTaskView) taskView; } else { Task task = groupTask.task1.key.id == stagedTaskIdToBeRemoved ? groupTask.task2 : groupTask.task1; Loading Loading @@ -4970,7 +4962,6 @@ public abstract class RecentsView< mSplitSelectStateController.setAnimateCurrentTaskDismissal( true /*animateCurrentTaskDismissal*/); mSplitHiddenTaskViewIndex = indexOfChild(taskView); updateDesktopTaskVisibility(false /* visible */); } /** Loading @@ -4992,13 +4983,6 @@ public abstract class RecentsView< mSplitSelectStateController.setInitialTaskSelect(splitSelectSource.intent, splitSelectSource.position.stagePosition, splitSelectSource.getItemInfo(), splitSelectSource.splitEvent, splitSelectSource.alreadyRunningTaskId); updateDesktopTaskVisibility(false /* visible */); } private void updateDesktopTaskVisibility(boolean visible) { if (mDesktopTaskView != null) { mDesktopTaskView.setVisibility(visible ? VISIBLE : GONE); } } /** Loading Loading @@ -5208,7 +5192,6 @@ public abstract class RecentsView< mSplitHiddenTaskView.setThumbnailVisibility(VISIBLE, INVALID_TASK_ID); mSplitHiddenTaskView = null; } updateDesktopTaskVisibility(true /* visible */); } private void safeRemoveDragLayerView(@Nullable View viewToRemove) { Loading