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

Commit 27ce0cd4 authored by Yinchu Chen's avatar Yinchu Chen
Browse files

Launch all activities into the same windowingMode



similar as 7e3fb8e7(Launch all activities into the same display)
when multiple activities are launched through a PendingIntent,
all activities need to be launched onto the same windowing mode.
that should be expected by caller, otherwise maybe the last activity is
freeform, others is fullscreen

Bug: 330548232
Change-Id: I188f79ef230cf142fec852fa73e7d422db417541
Test: manual test
Signed-off-by: default avatarShuiqiang Wu <wusq8@motorola.com>
parent eaceceda
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -140,7 +140,9 @@ public class SafeActivityOptions {
    }

    private ActivityOptions cloneLaunchingOptions(ActivityOptions options) {
        return options == null ? null : ActivityOptions.makeBasic()
        if (options == null) return null;

        final ActivityOptions cloneOptions = ActivityOptions.makeBasic()
                .setLaunchTaskDisplayArea(options.getLaunchTaskDisplayArea())
                .setLaunchDisplayId(options.getLaunchDisplayId())
                .setCallerDisplayId(options.getCallerDisplayId())
@@ -150,6 +152,8 @@ public class SafeActivityOptions {
                .setPendingIntentCreatorBackgroundActivityStartMode(
                        options.getPendingIntentCreatorBackgroundActivityStartMode())
                .setRemoteTransition(options.getRemoteTransition());
        cloneOptions.setLaunchWindowingMode(options.getLaunchWindowingMode());
        return cloneOptions;
    }

    /**