CircleBattery: Revamped charging animation

Youtube Video: https://www.youtube.com/watch?v=nztroKnBDPs

Patchset 2: removed obsolete mPaintAnim

Change-Id: I629614497fc47d96eda03912d5dac4d6dd2ed0df
NotificationBar: Force DateView to collapse to gain space for clear_all_button

When DateFormat.getLongDateFormat() text is too long, the notification "clear_all_button" button
is hidden because DateView width. This change redesign the notification bar layout to force
DateView to collapse. This forces you to change the position of the buttons to the right.

Alternatives:

Patch 1: Align buttons (rotation and settings) to the right

Patch 2: Align buttons (rotation and settings) to the middle

Patch 3: Compute the text width of DateView to fit the maximum allowed by the status bar.
           * Calculate dinamicaly the width of the DateView to assign the maximum width
             when it fit in the screen, and stretch when not fit
           * Redesign the DateView widget. Now is a LinearLayout with 2 TextView's. This allow
             the use of ellipsize, because it is set to single line. Otherwise when the text is set
             the DateView don't show the ellipsize, although the view fit to the width.
Patch 4: Fix bug that in some circumstances ellipsize is not displayed

Change-Id: I2486c5e6b7d83a3c483519c17cdf57e90b50c79e
systemui: Restore original status bar date view spacing

Stock:
http://imageshack.us/f/4/screenshot2012100921561.png/

Before:
http://imageshack.us/f/708/screenshot2012100921561.png/

After (plus another icon patch):
http://imageshack.us/f/37/screenshot2012100922390.png/

Change-Id: I609778d2878a401380e81b14c318d2595297d1dc
Add onClick action to notification clock and date

In expanded StatusBar
- clicking clock opens alarms
- clicking date opens calendar - today selected

http://www.youtube.com/watch?v=MLom5e3nQoA

PS3: added turn-blue-on-click
PS4++: nitpicking cleanups

Change-Id: I850732dcca0e65af59ce009aaf9f7ba18bcaf915
Add onLongClick action to notication clock and date

- As discussed with ciwrl on google+, LongClick opens DateTimeSettings
- Moved on-touch color change to superior xml solution, as suggested by
  Andrew Boren <preludedrew@gmail.com> here: http://review.evervolv.com/#/c/3676/"

Change-Id: I1fae71e347ffcb786227ba0b2651a66f2df35e27
Add SET_ALARM permission for SystemUI

If one or more third-party alarm clock app is installed, clicking clock should open an app chooser for the alarm clock. However, permission for com.android.alarm.permission.SET_ALARM is required to make this behaviour work properly.

See http://forum.xda-developers.com/showpost.php?p=33155463&postcount=2749 for symptom if this permission is not assigned.

Change-Id: Iaf8cb9aba6e53da021da5373493b1419096e91fa
Performance increase in thumbnail handling

Allow for 160*120 thumbnails which is what cameras commonly
generates. The constants for the micro thumbnail were set to other
values, resulting in recalculations of the thumbnais, which
takes time.

This change only affects the maximum size of the temporary image,
when choosing whether to use the EXIF thumbnail or decoding and
downsampling the full image. Without this change, it will choose
an x16 downsampling of the full image over an x2 downsampling of
the EXIF thumbnail, after the change it will prefer the EXIF
thumbnail.

Cf the DCF specifications at http://www.exif.org/dcf.PDF,
"3.3.6. DCF basic thumbnail data structure, (C) Pixel count"

Tested by running DDMS and measuring the time required to create
a thumbnail. This was 220-280 ms prior to change, < 20 ms after.

Change-Id: I59c753493f947e920bad3fde5eeed5d49d509863
Merge remote-tracking branch 'upstream/jb-ras' into jb-ras