Fix detection of root view within inflate() call

This CL expandes the simplistic isAttachedToWindow()
check with additional checks on the parents.

BUG: 21792119

Change-Id: Ie69e7c681bb4a8bed5fd03fe80843a53ece15f28
1 file changed