summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-04 19:06:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-12-04 19:06:59 +0000
commit2256afcbdbe70b02909b5ec5cb2f45eff8578dc8 (patch)
treebae9e3e364a7df35d276a503d7994f15fed7ead3
parent70e17dfd29e23e6b7105cfef704af399bfe5a416 (diff)
parentde164ba73b704cff4716d8b185508143fe89a8f4 (diff)
Merge "[PIP2] Fix NPE for onSwipePipToHomeAnimation" into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java6
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) {