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

Commit 09a60d8a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Fix build breakage by mismatched type

Because commit 62c6c83f is merged after commit 396cea1a.
Use generic type so the error prone cast is eliminated.

Bug: 202740040
Bug: 203186792
Test: build
Change-Id: I55288f4f57830022a77b207b3ad93aeac1fcb1ff
parent f9389e27
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * Server side implementation for the interface for organizing windows
@@ -850,7 +849,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub

    private int reparentChildrenTasksHierarchyOp(WindowContainerTransaction.HierarchyOp hop,
            @Nullable Transition transition, int syncId) {
        WindowContainer currentParent = hop.getContainer() != null
        WindowContainer<?> currentParent = hop.getContainer() != null
                ? WindowContainer.fromBinder(hop.getContainer()) : null;
        WindowContainer newParent = hop.getNewParent() != null
                ? WindowContainer.fromBinder(hop.getNewParent()) : null;
@@ -893,7 +892,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
        // We want to collect the tasks first before re-parenting to avoid array shifting on us.
        final ArrayList<Task> tasksToReparent = new ArrayList<>();

        currentParent.forAllTasks((Function<Task, Boolean>) task -> {
        currentParent.forAllTasks(task -> {
            Slog.i(TAG, " Processing task=" + task);
            final boolean reparent;
            if (task.mCreatedByOrganizer || task.getParent() != finalCurrentParent) {