Fix issue #1401973 and #2111181 (menu placement problems).

Issue 1401973: A dialog with menu has wrong menu placement
Issue 2111181: status bar overlaps the more menu in browser

Menus are now dialog panels, so they are placed within the entire
screen and not attached to their parent window.

Change-Id: Ia9702d5e30a6ba5ebb0254abe6a94cbbdfa9866d
diff --git a/policy/com/android/internal/policy/impl/PhoneWindow.java b/policy/com/android/internal/policy/impl/PhoneWindow.java
index d8d2788..05dc936 100644
--- a/policy/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/com/android/internal/policy/impl/PhoneWindow.java
@@ -452,10 +452,9 @@
 
         WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
                 WRAP_CONTENT, WRAP_CONTENT,
-                st.x, st.y, WindowManager.LayoutParams.TYPE_APPLICATION_PANEL,
+                st.x, st.y, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG,
                 WindowManager.LayoutParams.FLAG_DITHER
-                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
-                | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
+                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
                 st.decorView.mDefaultOpacity);
 
         lp.gravity = st.gravity;