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

Commit 3a2d6214 authored by Tony Huang's avatar Tony Huang
Browse files

Refactor startIntentAndTaskWithLegacyTransition

Param intentFirst is not necessary because we could use stagePosition
to ensure intent side is left or right.
Remove it and ensure start task on main stage at split side.

Bug: 218613028
Test: pass existing tests
Test: manual
Change-Id: I3b8fc74b18c4d48fe73b501be696c3d59677183b
parent b70131e1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -609,14 +609,13 @@ public class SystemUiProxy implements ISystemUiProxy,
    }

    public void startIntentAndTaskWithLegacyTransition(PendingIntent pendingIntent,
            Intent fillInIntent, int taskId, boolean intentFirst, Bundle mainOptions,
            Bundle sideOptions, @SplitConfigurationOptions.StagePosition int sidePosition,
            float splitRatio, RemoteAnimationAdapter adapter) {
            Intent fillInIntent, int taskId, Bundle mainOptions, Bundle sideOptions,
            @SplitConfigurationOptions.StagePosition int sidePosition, float splitRatio,
            RemoteAnimationAdapter adapter) {
        if (mSystemUiProxy != null) {
            try {
                mSplitScreen.startIntentAndTaskWithLegacyTransition(pendingIntent, fillInIntent,
                        taskId, intentFirst, mainOptions, sideOptions, sidePosition, splitRatio,
                        adapter);
                        taskId, mainOptions, sideOptions, sidePosition, splitRatio, adapter);
            } catch (RemoteException e) {
                Log.w(TAG, "Failed call startTasksWithLegacyTransition");
            }
+2 −3
Original line number Diff line number Diff line
@@ -156,9 +156,8 @@ public class SplitSelectStateController {
                        splitRatio, adapter);
            } else {
                mSystemUiProxy.startIntentAndTaskWithLegacyTransition(taskPendingIntent,
                        new Intent(), taskId2, stagePosition == STAGE_POSITION_TOP_OR_LEFT,
                        mainOpts.toBundle(), null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT,
                        splitRatio, adapter);
                        new Intent(), taskId2, mainOpts.toBundle(), null /* sideOptions */,
                        stagePosition, splitRatio, adapter);
            }
        }
    }