Fix calls to Rect.intersect(Rect) in package com.android.server.wm

This CL checks for the return value for Rect.intersect(Rect) for whether
there is actually an intersection before taking the calling rect as the
intersection. In addtion, this CL handles the cases where there is no
intersection (Rect.intersect(Rect) returns false).

bug: 7368679
Change-Id: I7d5ef7059ac432170470a108c0d6dece230ec0b3
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index f914369..5d6df26 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -238,6 +238,7 @@
             final TaskStack stack = win.getStack();
             if (win.isVisibleLw() && stack != null && stack != focusedStack) {
                 mTmpRect.set(win.mVisibleFrame);
+                // If no intersection, we need mTmpRect to be unmodified.
                 mTmpRect.intersect(win.mVisibleInsets);
                 mTouchExcludeRegion.op(mTmpRect, Region.Op.DIFFERENCE);
             }