resolved conflicts for merge of f6a04305 to mnc-dev

Change-Id: I92e666bfd6d8ad051bdee7dce5712b9cb8e6a01d
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 46793b9..8f8b1a4 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -4093,7 +4093,12 @@
 
         // If the device has a chin (e.g. some watches), a dead area at the bottom of the screen we
         // need to provide information to the clients that want to pretend that you can draw there.
-        if (isDefaultDisplay && (fl & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0) {
+        // We only want to apply outsets to certain types of windows. For example, we never want to
+        // apply the outsets to floating dialogs, because they wouldn't make sense there.
+        final boolean useOutsets = attrs.type == TYPE_WALLPAPER
+                || (fl & (WindowManager.LayoutParams.FLAG_FULLSCREEN
+                        | WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN)) != 0;
+        if (isDefaultDisplay && useOutsets) {
             osf = mTmpOutsetFrame;
             osf.set(cf.left, cf.top, cf.right, cf.bottom);
             int outset = ScreenShapeHelper.getWindowOutsetBottomPx(mContext.getResources());