Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0356d73 authored by Vinit Nayak's avatar Vinit Nayak Committed by Automerger Merge Worker
Browse files

Merge "Add logs to RemoteTargetGluer for index exception" into udc-dev am: 84921778

parents 4f1a6302 84921778
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.quickstep;
import android.app.WindowConfiguration;
import android.content.Context;
import android.graphics.Rect;
import android.util.Log;
import android.view.RemoteAnimationTarget;

import androidx.annotation.Nullable;
@@ -37,6 +38,8 @@ import java.util.Arrays;
 * {@link TaskViewSimulator}
 */
public class RemoteTargetGluer {
    private static final String TAG = "RemoteTargetGluer";

    private static final int DEFAULT_NUM_HANDLES = 2;

    private RemoteTargetHandle[] mRemoteTargetHandles;
@@ -118,7 +121,9 @@ public class RemoteTargetGluer {
        long appCount = Arrays.stream(targets.apps)
                .filter(app -> app.mode == targets.targetMode)
                .count();
        Log.d(TAG, "appCount: " + appCount + " handleLength: " + mRemoteTargetHandles.length);
        if (appCount < mRemoteTargetHandles.length) {
            Log.d(TAG, "resizing handles");
            RemoteTargetHandle[] newHandles = new RemoteTargetHandle[(int) appCount];
            System.arraycopy(mRemoteTargetHandles, 0/*src*/, newHandles, 0/*dst*/, (int) appCount);
            mRemoteTargetHandles = newHandles;
@@ -128,6 +133,8 @@ public class RemoteTargetGluer {
                .anyMatch(remoteAnimationTarget ->
                        remoteAnimationTarget.windowConfiguration.getWindowingMode()
                                == WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW);
        Log.d(TAG, "containsSplitTargets? " + containsSplitTargets + " handleLength: " +
                mRemoteTargetHandles.length + " appsLength: " + targets.apps.length);

        if (mRemoteTargetHandles.length == 1) {
            // Single fullscreen app