Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Change-Id: If73d225e38d0a2f7c616c4aeb33f67bdaed390f1
Avoid layout passes when updating data activity indicators.

ImageView can optimize out layout passes if old and new drawable have
equal sizes. Take advantage of that by displaying a transparent drawable
with the same size as the in/out drawables when there's no activity
instead of clearing out the drawable in that case.

Change-Id: Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01
Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty.
This often occurs after an incomplete reboot/shutdown or battery pull.

Patchset 2: Cleanup
Patchset 3: More Cleanup
Patchset 4: derp

Change-Id: I4f01151f4051df4ae1b85fa460ec7a9e70122878
Merge "Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty. This often occurs after an incomplete reboot/shutdown or battery pull." into android-4.4
Merge "Avoid layout passes when updating data activity indicators." into android-4.4
Merge "Make ImageView drawable update more efficient in some cases." into android-4.4
Merge remote-tracking branch 'cm/android-4.4' into android-4.4