Fix for breakText returning count of glyphs not chars.

Paint.breakText should return the number of characters measured to a given maxWidth, but it returns the number of glyphs instead. The solution loops through the advances and whenever if finds an advance with length bigger than 0 decrements it until reaching zero or the end of the advances. The advance has a zero when a glyphs is for more than on character, for the subsequent characters. The width of the glyphs is added at the first character.

Change-Id: If26fca3a08133d08572dfda1e33536cc0bd8b1e5
Remove possible leak when exception occurred.

nameUtf8 is not released after exception.
In addtion, Fix code going down after ThrowException.

Change-Id: Id46e8ed55acd98e982ae532f7da2c0c48847f010
Recognize odex files in memory accounting.

Give odex files the same heap category as dex files.

Change-Id: I82539e20ac20a2b80c63c0cfceb266d9c59e22b7
Account malloc mmaped pages as native heap.

Currently when malloc uses a page rather than brk the heap gets accounted as
ashmem memory. Previously the memory would be accounted as unknown but since
[1] it gets accounted as ashmem. This change makes the accounting see this
memory as being native, ie the same kind of memory we associate with brk.

[1] https://android-review.googlesource.com/#/c/49583/3

Change-Id: I6f496cfeb590268d41d8e047b12cd5c90359e2b0
Low-end devices need help!

-> Check for wakelocks faster
-> More granular hidden apps selection
-> Kill hidden and service_b apps at higher lmk
-> Rearrange OOM values [similar to SuperCharger! But not exact]

Change-Id: If6163a8c15b8c3ec622a44124609be21b4359e36
Smarter feedback for moved properties

Previously, getting and setting moved (old location works but is read read-only)
 properties both warned. Now, getting a read-only property is NOT warned, and
 trying to set a read-only property is logged as an error, not a warning.

Change-Id: I2b93620a3634c0e8b14ebe7cbfb94bf6d7ade374
Now that weve found the needle, heres the hay!
Fixing missing internal link in document.

Change-Id: I80b8712815ac05acfa753cbb40875b869d2e942d
Fixed incorrect calculation of dirty invalidation area

Padding was already taken into consideration before calling
invalidateDrawable in ProgressBar.

Change-Id: Id7f23bd15bb19e2294c07adb2acb397100ea97e8
Remove excess spaces from end of lines in Instrumentation.java

It makes the formatting all crazy.

Change-Id: I4f5041a680fdffd4affea9ace1ac0d33e5367e1f
Correct executable bit for source files [Take 2]

Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some
files, this fixes them.

Change-Id: Ia949a8581668836ea0251602e048f09c852f5169