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

Commit f50c6f4e authored by Chris Li's avatar Chris Li
Browse files

Allow multiple adjacent TFs (8/n)

Make sure #getAdjacentTaskFragment is not used when flag is enabled.

Bug: 373709676
Test: refactor, pass existing test
Flag: com.android.window.flags.allow_multiple_adjacent_task_fragments
Change-Id: I80a4a54491c4e22126e183dc1f7444b801a00aae
parent fe02ed6d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -518,11 +518,14 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        }
    }

    // TODO(b/373709676): update usages.
    /** @deprecated b/373709676 replace with {@link #getAdjacentTaskFragments()}. */
    @Deprecated
    @Nullable
    TaskFragment getAdjacentTaskFragment() {
        if (Flags.allowMultipleAdjacentTaskFragments()) {
            throw new IllegalStateException("allowMultipleAdjacentTaskFragments is enabled. "
                    + "Use #getAdjacentTaskFragments instead");
        }
        return mAdjacentTaskFragment;
    }