Preserve the controlling state of appearance and behavior

Make sure the appearance or the behavior controlled by the new APIs
won't be affected by setting new LayoutParams.

This CL also makes ViewRootImpl#setLayoutParams won't modify the
caller's LayoutParams.

Fix: 175169461
Test: atest ViewRootImplTest
Change-Id: I4cdd846e8638f9813146e6461134e4dd1606bd50
2 files changed