diff options
| author | 2024-12-04 19:06:59 +0000 | |
|---|---|---|
| committer | 2024-12-04 19:06:59 +0000 | |
| commit | 2256afcbdbe70b02909b5ec5cb2f45eff8578dc8 (patch) | |
| tree | bae9e3e364a7df35d276a503d7994f15fed7ead3 | |
| parent | 70e17dfd29e23e6b7105cfef704af399bfe5a416 (diff) | |
| parent | de164ba73b704cff4716d8b185508143fe89a8f4 (diff) | |
Merge "[PIP2] Fix NPE for onSwipePipToHomeAnimation" into main
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java index 19428ee39919..e309da10864d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java @@ -99,7 +99,7 @@ public class PipController implements ConfigurationChangeListener, private final List<Consumer<Boolean>> mOnIsInPipStateChangedListeners = new ArrayList<>(); // Wrapper for making Binder calls into PiP animation listener hosted in launcher's Recents. - private PipAnimationListener mPipRecentsAnimationListener; + @Nullable private PipAnimationListener mPipRecentsAnimationListener; @VisibleForTesting interface PipAnimationListener { @@ -378,7 +378,9 @@ public class PipController implements ConfigurationChangeListener, tx.setLayer(overlay, Integer.MAX_VALUE); tx.apply(); } - mPipRecentsAnimationListener.onPipAnimationStarted(); + if (mPipRecentsAnimationListener != null) { + mPipRecentsAnimationListener.onPipAnimationStarted(); + } } private void setLauncherKeepClearAreaHeight(boolean visible, int height) { |