Fix a bug where the running task would be drawn below recents task
When the live tile is the adjacent app to be launched, it will wrongly update the pivot and translate all the tasks to the side, resulting in a broken animation. This bug was introduced in ag/29639296, while fixing the launch of the the adjacent task while the live tile was in the center of the screen. To solve this excessive translation, we need to update pivot only when adjacent task is not a live tile. Bug: 361744056 Change-Id: I56cbabcc351b0becd791b58dd94f65cd0b533bc2 Test: Launch central/side large tile with different live tile combinations Flag: com.android.launcher3.enable_large_desktop_windowing_tile
This commit is contained in:
@@ -5418,6 +5418,7 @@ public abstract class RecentsView<
|
||||
|
||||
int taskIndex = indexOfChild(taskView);
|
||||
int centerTaskIndex = getCurrentPage();
|
||||
boolean isRunningTask = taskView.isRunningTask();
|
||||
|
||||
float toScale = getMaxScaleForFullScreen();
|
||||
boolean showAsGrid = showAsGrid();
|
||||
@@ -5436,13 +5437,16 @@ public abstract class RecentsView<
|
||||
mTempPointF);
|
||||
setPivotX(mTempPointF.x);
|
||||
setPivotY(mTempPointF.y);
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> {
|
||||
remoteTargetHandle.getTaskViewSimulator().setPivotOverride(
|
||||
mTempPointF);
|
||||
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(
|
||||
false);
|
||||
});
|
||||
|
||||
if (!isRunningTask) {
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> {
|
||||
remoteTargetHandle.getTaskViewSimulator().setPivotOverride(
|
||||
mTempPointF);
|
||||
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(
|
||||
false);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (!showAsGrid) {
|
||||
|
||||
Reference in New Issue
Block a user