Revert "Revert "Fix issue in attached layouting""

This reverts commit 9acce426520e639fd91eef8b62651803a98a7273.

Underlying issue fixed in follow up CL.

Test: PopupWindowTest
Bug: 130231322
Bug: 130553898
Change-Id: I5e332394868eb26ef44ce155bc41eb4405d0093a
1 file changed