Remove usage of FloatMath

Cherry pick of commit ba41458f5c696194d547ac8f24e9f8e58cfa64fc
plus changes to BitmapUtils.java.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I2effc3f498fb13e66de9a905b9a40ac5688a5850
3 files changed