OSDN Git Service

Prevent overflow from MeasureSpec.adjust; measure cache fix
authorAdam Powell <adamp@google.com>
Fri, 7 Mar 2014 01:55:16 +0000 (17:55 -0800)
committerAdam Powell <adamp@google.com>
Mon, 10 Mar 2014 21:09:18 +0000 (14:09 -0700)
commitfd6b99750bfab7f930ee375a79009874a3196165
treeb122d36116e37ca411dd5bdef134c70d3c685f53
parentc6f0b54d695b49966a13bb196800a985ac6ce212
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
core/java/android/view/View.java