Fix regression handling negative sizes.
Fix regression handling negative sizes.

Change-Id: Ib177af2fce9be4dabffa801f64580b1ea7adc673

xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base