In multi-window mode, when the activity is resized, the window might exist even before onCreate, which could call onAttachToWindow while they are being inflated. Many Views in Launcher assume onAttachToWindow to be called after onCreate has completed. Bug: 32745705 Change-Id: Id6ee68826c4f3cc579880540812fd8ed834f8267