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

Commit 7622d71a authored by Vinit Nayak's avatar Vinit Nayak Committed by Winson Chung
Browse files

Add null check for pendingIntent2 ProtoLogs

* Mark argument as @Nullable as well

Test: Crash doesn't happen
Fixes: 328459060
Change-Id: Ib301a280e769cd9170fb5f02e3ddce111d796298
Merged-In: Ib301a280e769cd9170fb5f02e3ddce111d796298
parent d0677e96
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -820,14 +820,15 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,

    void startIntents(PendingIntent pendingIntent1, Intent fillInIntent1,
            @Nullable ShortcutInfo shortcutInfo1, @Nullable Bundle options1,
            PendingIntent pendingIntent2, Intent fillInIntent2,
            @Nullable PendingIntent pendingIntent2, Intent fillInIntent2,
            @Nullable ShortcutInfo shortcutInfo2, @Nullable Bundle options2,
            @SplitPosition int splitPosition, @PersistentSnapPosition int snapPosition,
            @Nullable RemoteTransition remoteTransition, InstanceId instanceId) {
        ProtoLog.d(WM_SHELL_SPLIT_SCREEN,
                "startIntents: intent1=%s intent2=%s position=%d snapPosition=%d",
                pendingIntent1.getIntent(), pendingIntent2.getIntent(), splitPosition,
                snapPosition);
                pendingIntent1.getIntent(),
                (pendingIntent2 != null ? pendingIntent2.getIntent() : "null"),
                splitPosition, snapPosition);
        final WindowContainerTransaction wct = new WindowContainerTransaction();
        if (pendingIntent2 == null) {
            options1 = options1 != null ? options1 : new Bundle();