mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 10:26:52 +00:00
Merge "Handle race between creating and assigning RemoteTargetHandles" into sc-v2-dev am: 30d46ef842
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16065856 Change-Id: I981c2d1f6a173be05533d0dd736547b0056c67fa
This commit is contained in:
@@ -16,9 +16,8 @@
|
||||
|
||||
package com.android.quickstep;
|
||||
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -34,7 +33,9 @@ import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
* {@link TaskViewSimulator}
|
||||
*/
|
||||
public class RemoteTargetGluer {
|
||||
private final RemoteTargetHandle[] mRemoteTargetHandles;
|
||||
private static final String TAG = "RemoteTargetGluer";
|
||||
|
||||
private RemoteTargetHandle[] mRemoteTargetHandles;
|
||||
private SplitConfigurationOptions.StagedSplitBounds mStagedSplitBounds;
|
||||
|
||||
/**
|
||||
@@ -93,6 +94,13 @@ public class RemoteTargetGluer {
|
||||
public RemoteTargetHandle[] assignTargetsForSplitScreen(RemoteAnimationTargets targets) {
|
||||
int[] splitIds = LauncherSplitScreenListener.INSTANCE.getNoCreate()
|
||||
.getRunningSplitTaskIds();
|
||||
if (splitIds.length == 0 && mRemoteTargetHandles.length > 1) {
|
||||
// There's a chance that between the creation of this class and assigning targets,
|
||||
// LauncherSplitScreenListener may have received callback that removes split
|
||||
mRemoteTargetHandles = new RemoteTargetHandle[]{mRemoteTargetHandles[0]};
|
||||
Log.w(TAG, "splitTaskIds changed between creation and assignment");
|
||||
}
|
||||
|
||||
RemoteAnimationTargetCompat primaryTaskTarget;
|
||||
RemoteAnimationTargetCompat secondaryTaskTarget;
|
||||
if (mRemoteTargetHandles.length == 1) {
|
||||
|
||||
Reference in New Issue
Block a user