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

Commit 66f52cb0 authored by Louis Chang's avatar Louis Chang
Browse files

Implementing new ActivityEmbeddingComponent APIs

Implementing ActivityEmbeddingComponent#setLaunchingActivityStack

Also increase vendor API level to 3.

Bug: 229680885
Test: verified activity launched on primary TaskFragment
Change-Id: I492c4d90a7d0182d2310a7916517890072b28278
parent 1c8345ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class WindowExtensionsImpl implements WindowExtensions {
    // TODO(b/241126279) Introduce constants to better version functionality
    @Override
    public int getVendorApiLevel() {
        return 2;
        return 3;
    }

    @NonNull
+9 −0
Original line number Diff line number Diff line
@@ -230,6 +230,14 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
        return mSplitAttributesCalculator;
    }

    @Override
    @NonNull
    public ActivityOptions setLaunchingActivityStack(@NonNull ActivityOptions options,
            @NonNull IBinder token) {
        options.setLaunchTaskFragmentToken(token);
        return options;
    }

    @NonNull
    @GuardedBy("mLock")
    @VisibleForTesting
@@ -2064,6 +2072,7 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
                    transactionRecord.apply(false /* shouldApplyIndependently */);
                    // Amend the request to let the WM know that the activity should be placed in
                    // the dedicated container.
                    // TODO(b/229680885): skip override launching TaskFragment token by split-rule
                    options.putBinder(ActivityOptions.KEY_LAUNCH_TASK_FRAGMENT_TOKEN,
                            launchedInTaskFragment.getTaskFragmentToken());
                    mCurrentIntent = intent;