Prevent overflow from MeasureSpec.adjust; measure cache fix

Extract the size from the MeasureSpec value before adding the
delta. The opposite order could result in a negative delta causing
overflow into size from the EXACTLY mode, creating a very large size
value in the resulting MeasureSpec.

Don't reapply optical bounds insets after pulling a value from the
measurement cache. (The insets will have already been applied before
insertion into the cache.)

Change-Id: Ib0154f4d6c3a7c31e7fee24fd7d5d10cc5dc71a1
1 file changed