mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Merge "Include assistant in RemoteTargetGluer" into udc-dev am: 76ad67a07a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23574112 Change-Id: Ib4b62571c4e5b978b681b77086bb19f8d4d09763 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.quickstep;
|
||||
|
||||
import android.app.WindowConfiguration;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.view.RemoteAnimationTarget;
|
||||
@@ -123,7 +124,14 @@ public class RemoteTargetGluer {
|
||||
mRemoteTargetHandles = newHandles;
|
||||
}
|
||||
|
||||
boolean containsSplitTargets = Arrays.stream(targets.apps)
|
||||
.anyMatch(remoteAnimationTarget ->
|
||||
remoteAnimationTarget.windowConfiguration.getWindowingMode()
|
||||
== WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW);
|
||||
|
||||
if (mRemoteTargetHandles.length == 1) {
|
||||
// Single fullscreen app
|
||||
|
||||
// If we're not in split screen, the splitIds count doesn't really matter since we
|
||||
// should always hit this case.
|
||||
mRemoteTargetHandles[0].mTransformParams.setTargetSet(targets);
|
||||
@@ -131,13 +139,29 @@ public class RemoteTargetGluer {
|
||||
// Unclear why/when target.apps length == 0, but it sure does happen :(
|
||||
mRemoteTargetHandles[0].mTaskViewSimulator.setPreview(targets.apps[0], null);
|
||||
}
|
||||
} else if (!containsSplitTargets) {
|
||||
// Single App + Assistant
|
||||
for (int i = 0; i < mRemoteTargetHandles.length; i++) {
|
||||
mRemoteTargetHandles[i].mTransformParams.setTargetSet(targets);
|
||||
mRemoteTargetHandles[i].mTaskViewSimulator.setPreview(targets.apps[i], null);
|
||||
}
|
||||
} else {
|
||||
RemoteAnimationTarget topLeftTarget = targets.apps[0];
|
||||
// Split apps (+ maybe assistant)
|
||||
RemoteAnimationTarget topLeftTarget = Arrays.stream(targets.apps)
|
||||
.filter(remoteAnimationTarget ->
|
||||
remoteAnimationTarget.windowConfiguration.getWindowingMode()
|
||||
== WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW)
|
||||
.findFirst().get();
|
||||
|
||||
// Fetch the adjacent target for split screen.
|
||||
RemoteAnimationTarget bottomRightTarget = null;
|
||||
for (int i = 1; i < targets.apps.length; i++) {
|
||||
for (int i = 0; i < targets.apps.length; i++) {
|
||||
final RemoteAnimationTarget target = targets.apps[i];
|
||||
if (target.windowConfiguration.getWindowingMode() !=
|
||||
WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW ||
|
||||
target == topLeftTarget) {
|
||||
continue;
|
||||
}
|
||||
Rect topLeftBounds = getStartBounds(topLeftTarget);
|
||||
Rect bounds = getStartBounds(target);
|
||||
if (topLeftBounds.left > bounds.right || topLeftBounds.top > bounds.bottom) {
|
||||
|
||||
@@ -411,7 +411,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
// transitions, the animation leashes are reparented to an animation container so we
|
||||
// can bump layers as needed.
|
||||
builder.setLayer(mDrawsBelowRecents
|
||||
? Integer.MIN_VALUE + 1
|
||||
? Integer.MIN_VALUE + app.prefixOrderIndex
|
||||
: ENABLE_SHELL_TRANSITIONS ? Integer.MAX_VALUE : 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user