diff options
| author | 2024-03-06 12:32:07 -0800 | |
|---|---|---|
| committer | 2024-03-07 20:48:06 +0000 | |
| commit | 7622d71aa5e239edd30557b20f860617cca9449b (patch) | |
| tree | ce566d80a8665ed7b80ee6f44b57dd0a10519522 | |
| parent | d0677e9650bd47bf7fe56b22c93272cdaed2fa92 (diff) | |
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
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index 76504447339f..9dd4c193a006 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -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(); |