Cherry-pick Change I4e9995cc to new layoutlib project

Test: layoutlib tests
Change-Id: If24415bb0f09fb3977beb93ffa5a057137a36b18
13 files changed