PiP: Null-check menu view when dispatching touch events to the menu.

Although this should not happen, it is possible that sometimes touch
events can be dispatched to the menu controller when the menu is not
around (SystemUI crash, perhaps).

Bug: 170707099
Test: None
Change-Id: I0d0c9826b10bf9071902075f0ad51051a5009d17
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java
index 65f3d3a..4cf8ab4 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java
@@ -526,6 +526,10 @@
      * Handles a pointer event sent from pip input consumer.
      */
     void handlePointerEvent(MotionEvent ev) {
+        if (mPipMenuView == null) {
+            return;
+        }
+
         if (ev.isTouchEvent()) {
             mPipMenuView.dispatchTouchEvent(ev);
         } else {