Search in sources :

Example 1 with RemoteTargetGluer

use of com.android.quickstep.RemoteTargetGluer in project android_packages_apps_Launcher3 by AOSPA.

the class RecentsView method setRecentsAnimationTargets.

// TODO: To be removed in a follow up CL
public void setRecentsAnimationTargets(RecentsAnimationController recentsAnimationController, RecentsAnimationTargets recentsAnimationTargets) {
    mRecentsAnimationController = recentsAnimationController;
    mSplitSelectStateController.setRecentsAnimationRunning(true);
    if (recentsAnimationTargets == null || recentsAnimationTargets.apps.length == 0) {
        return;
    }
    RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
    mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
    mSplitBoundsConfig = gluer.getStagedSplitBounds();
    // Add release check to the targets from the RemoteTargetGluer and not the targets
    // passed in because in the event we're in split screen, we use the passed in targets
    // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
    // mSyncTransactionApplier doesn't get transferred over
    runActionOnRemoteHandles(remoteTargetHandle -> {
        final TransformParams params = remoteTargetHandle.getTransformParams();
        if (mSyncTransactionApplier != null) {
            params.setSyncTransactionApplier(mSyncTransactionApplier);
            params.getTargetSet().addReleaseCheck(mSyncTransactionApplier);
        }
        TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
        tvs.setOrientationState(mOrientationState);
        tvs.setDp(mActivity.getDeviceProfile());
        tvs.recentsViewScale.value = 1;
    });
    TaskView runningTaskView = getRunningTaskView();
    if (runningTaskView instanceof GroupedTaskView) {
        // We initially create a GroupedTaskView in showCurrentTask() before launcher even
        // receives the leashes for the remote apps, so the mSplitBoundsConfig that gets passed
        // in there is either null or outdated, so we need to update here as soon as we're
        // notified.
        ((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
    }
}
Also used : RemoteTargetGluer(com.android.quickstep.RemoteTargetGluer) TaskViewSimulator(com.android.quickstep.util.TaskViewSimulator) TransformParams(com.android.quickstep.util.TransformParams)

Example 2 with RemoteTargetGluer

use of com.android.quickstep.RemoteTargetGluer in project android_packages_apps_404Launcher by P-404.

the class RecentsView method setRecentsAnimationTargets.

// TODO: To be removed in a follow up CL
public void setRecentsAnimationTargets(RecentsAnimationController recentsAnimationController, RecentsAnimationTargets recentsAnimationTargets) {
    mRecentsAnimationController = recentsAnimationController;
    mSplitSelectStateController.setRecentsAnimationRunning(true);
    if (recentsAnimationTargets == null || recentsAnimationTargets.apps.length == 0) {
        return;
    }
    RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
    mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
    mSplitBoundsConfig = gluer.getStagedSplitBounds();
    // Add release check to the targets from the RemoteTargetGluer and not the targets
    // passed in because in the event we're in split screen, we use the passed in targets
    // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
    // mSyncTransactionApplier doesn't get transferred over
    runActionOnRemoteHandles(remoteTargetHandle -> {
        final TransformParams params = remoteTargetHandle.getTransformParams();
        if (mSyncTransactionApplier != null) {
            params.setSyncTransactionApplier(mSyncTransactionApplier);
            params.getTargetSet().addReleaseCheck(mSyncTransactionApplier);
        }
        TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
        tvs.setOrientationState(mOrientationState);
        tvs.setDp(mActivity.getDeviceProfile());
        tvs.recentsViewScale.value = 1;
    });
    TaskView runningTaskView = getRunningTaskView();
    if (runningTaskView instanceof GroupedTaskView) {
        // We initially create a GroupedTaskView in showCurrentTask() before launcher even
        // receives the leashes for the remote apps, so the mSplitBoundsConfig that gets passed
        // in there is either null or outdated, so we need to update here as soon as we're
        // notified.
        ((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
    }
}
Also used : RemoteTargetGluer(com.android.quickstep.RemoteTargetGluer) TaskViewSimulator(com.android.quickstep.util.TaskViewSimulator) TransformParams(com.android.quickstep.util.TransformParams)

Example 3 with RemoteTargetGluer

use of com.android.quickstep.RemoteTargetGluer in project android_packages_apps_Launcher3 by ArrowOS.

the class RecentsView method setRecentsAnimationTargets.

// TODO: To be removed in a follow up CL
public void setRecentsAnimationTargets(RecentsAnimationController recentsAnimationController, RecentsAnimationTargets recentsAnimationTargets) {
    mRecentsAnimationController = recentsAnimationController;
    mSplitSelectStateController.setRecentsAnimationRunning(true);
    if (recentsAnimationTargets == null || recentsAnimationTargets.apps.length == 0) {
        return;
    }
    RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
    mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
    mSplitBoundsConfig = gluer.getStagedSplitBounds();
    // Add release check to the targets from the RemoteTargetGluer and not the targets
    // passed in because in the event we're in split screen, we use the passed in targets
    // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
    // mSyncTransactionApplier doesn't get transferred over
    runActionOnRemoteHandles(remoteTargetHandle -> {
        final TransformParams params = remoteTargetHandle.getTransformParams();
        if (mSyncTransactionApplier != null) {
            params.setSyncTransactionApplier(mSyncTransactionApplier);
            params.getTargetSet().addReleaseCheck(mSyncTransactionApplier);
        }
        TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
        tvs.setOrientationState(mOrientationState);
        tvs.setDp(mActivity.getDeviceProfile());
        tvs.recentsViewScale.value = 1;
    });
    TaskView runningTaskView = getRunningTaskView();
    if (runningTaskView instanceof GroupedTaskView) {
        // We initially create a GroupedTaskView in showCurrentTask() before launcher even
        // receives the leashes for the remote apps, so the mSplitBoundsConfig that gets passed
        // in there is either null or outdated, so we need to update here as soon as we're
        // notified.
        ((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
    }
}
Also used : RemoteTargetGluer(com.android.quickstep.RemoteTargetGluer) TaskViewSimulator(com.android.quickstep.util.TaskViewSimulator) TransformParams(com.android.quickstep.util.TransformParams)

Example 4 with RemoteTargetGluer

use of com.android.quickstep.RemoteTargetGluer in project android_packages_apps_Launcher3 by ProtonAOSP.

the class RecentsView method setRecentsAnimationTargets.

// TODO: To be removed in a follow up CL
public void setRecentsAnimationTargets(RecentsAnimationController recentsAnimationController, RecentsAnimationTargets recentsAnimationTargets) {
    mRecentsAnimationController = recentsAnimationController;
    mSplitSelectStateController.setRecentsAnimationRunning(true);
    if (recentsAnimationTargets == null || recentsAnimationTargets.apps.length == 0) {
        return;
    }
    RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
    mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
    mSplitBoundsConfig = gluer.getStagedSplitBounds();
    // Add release check to the targets from the RemoteTargetGluer and not the targets
    // passed in because in the event we're in split screen, we use the passed in targets
    // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
    // mSyncTransactionApplier doesn't get transferred over
    runActionOnRemoteHandles(remoteTargetHandle -> {
        final TransformParams params = remoteTargetHandle.getTransformParams();
        if (mSyncTransactionApplier != null) {
            params.setSyncTransactionApplier(mSyncTransactionApplier);
            params.getTargetSet().addReleaseCheck(mSyncTransactionApplier);
        }
        TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
        tvs.setOrientationState(mOrientationState);
        tvs.setDp(mActivity.getDeviceProfile());
        tvs.recentsViewScale.value = 1;
    });
    TaskView runningTaskView = getRunningTaskView();
    if (runningTaskView instanceof GroupedTaskView) {
        // We initially create a GroupedTaskView in showCurrentTask() before launcher even
        // receives the leashes for the remote apps, so the mSplitBoundsConfig that gets passed
        // in there is either null or outdated, so we need to update here as soon as we're
        // notified.
        ((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
    }
}
Also used : RemoteTargetGluer(com.android.quickstep.RemoteTargetGluer) TaskViewSimulator(com.android.quickstep.util.TaskViewSimulator) TransformParams(com.android.quickstep.util.TransformParams)

Aggregations

RemoteTargetGluer (com.android.quickstep.RemoteTargetGluer)4 TaskViewSimulator (com.android.quickstep.util.TaskViewSimulator)4 TransformParams (com.android.quickstep.util.TransformParams)4