Merge "PopupWindow: Be more consistent about Gravity calculation." into nyc-mr1-dev
am: b19915bea8

Change-Id: Ie2f4ab820f05ee91b4e0f45f3bfdc24801a44d81