Don't crash during layout of non-attached but focused view

Verifies that there is a viewrootimpl before calling its
methods.

Bug: 77193567
Test: N/A
Change-Id: I301c3aede3d0f7e1d2abf6fe5bb3d852f697577b
1 file changed