Merge "PiP: Null-check menu view when dispatching touch events to the menu." into sc-dev

This commit is contained in:
Ben Lin
2021-04-05 22:40:59 +00:00
committed by Android (Google) Code Review

View File

@@ -526,6 +526,10 @@ public class PhonePipMenuController implements PipMenuController {
* Handles a pointer event sent from pip input consumer.
*/
void handlePointerEvent(MotionEvent ev) {
if (mPipMenuView == null) {
return;
}
if (ev.isTouchEvent()) {
mPipMenuView.dispatchTouchEvent(ev);
} else {