bootanimation: performance/speedup enhancements (squashed from CM10)

bootanim: Don't cache textures if they're expected to use a lot of VRAM (rmcc)
https://github.com/CyanogenMod/android_frameworks_base/commit/14f9eecd3f543a25c4a2053d6155a9396a777a3a#cmds/bootanimation

bootanimation: performance enhancements (turl)
https://github.com/CyanogenMod/android_frameworks_base/commit/e6b54405aa70d7503a114d9c90ef7518abdd7133#cmds/bootanimation

bootanimation: fix usage of LOGW (intervigilium)
https://github.com/CyanogenMod/android_frameworks_base/commit/e45cf7d232490f44aecf8f2447220a8b5ace4c10#cmds/bootanimation

bootanimation: allow using RGB565 instead of ARGB8888 (tpruvot)
https://github.com/CyanogenMod/android_frameworks_base/commit/204282870a9c69b04ad5ddecd73fafbd7996cbc0#cmds/bootanimation

Change-Id: I203fa23f77d1349fb822a7662e2cd3998ba4c814

bootanim: Don't cache textures if they're expected to use a lot of VRAM

bootanimation cached all the textures generated until the animation
was completed.
For Hi-res animations with lots of frames (like the new CM9 anim on
xhdpi devices), this implied using large amounts of video RAM, more
than most devices actually have available, causing the animation to
stall (and in some cases, gralloc to lock up); so if an animation is
expected to use a lot of RAM (rough estimation based on frame size
and number of frames), disable cache entirely and generate the textures
on demand

Change-Id: I157e5cdde2aab1d82d980d77cbedd9f127c83a1d

Conflicts:

	cmds/bootanimation/BootAnimation.cpp

bootanimation: performance enhancements

This patch implements two simple performance enhancements, which
might benefit devices. They are completely opt-in by setting
the following variables.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

  * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to
    force texture cache on/off.

Also fixes the sign warnings related to int / size_t comparison

Change-Id: Ie92d1b0aa90b43ba39c368a2a33657a60c3a64b5

Conflicts:

	cmds/bootanimation/BootAnimation.cpp

bootanimation: fix usage of LOGW

Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701

bootanimation: allow using RGB565 instead of ARGB8888

RGB565 uses considerably less memory, and together with texture
cache, it allows us to offer a really smooth bootanimation on
not so powerful devices.

Change-Id: I9da8fd7e6a587b5895519dd0983ec9b8f676771b
Fix Quiet Hours not muting notification sounds

4.2.2 touched the NotificationManager service, and some logic went missing in the merge it seems.
This should take care of it.

Change-Id: Ib3b88c83d2936871fbe25f1acbd10fd60c577944
Make sure we're using an up-to-date disable state when we're reloaded.

Change-Id: Ibf1ac67d92ba98294366d70cf4f9f8244677a7f4
Remove duplicate if statement

Change-Id: I7a9605815186d1dda79085bffa4250ee7497a5ed
Bugfix : Quick pulldown sometimes flips when it should not

When your Quick Settings Panel is set to

Quick pulldown : right

Sometimes (very intermittently) the tray flips (to Quick Settings) as you pull it down from the right side.

This is happening because the pull down happened so fast you can see the top 0-10 pixels of the tray,
and because it was showing the notifications, not the Quick Settiings

However the user expects the tray not to flip, but to just be on the Quck Settings.

The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar.
If this is the case, then the quick panel is swapped to (without flip)

Special Thanks to my daughter Jenny fo painstakingly reproducing this bug.

Change-Id: I8fdbedb1aa6d4fd672bd4cb58b7c99557469ab62
SystemUI: Avoid "phantom" status bar collapsing

There is one specific case where the status bar may collapse
for no aparent reason: When the last notification is removed.

If Quick Settings panel is showing while such a notification
is removed, the status bar WILL collapse -- and the user may
be left wondering why, because the notification that was just
removed isn't visible in that case.

A way to reproduce this behaviour follows:
  1) Settings -> System -> Quick Settings Panel -> uncheck
     "Auto close panel"
  2) Dismiss all notifications, even the sticky ones.
  3) Open the Quick Settings Panel and tap the apropriate
     tile to light the Torch
  4) Tap the tile again, to extinguish the Torch.

As you can see, the Quick Settings Panel collapses. This
happens because Torch puts up a notification, when lit and
removes it, just after it's turned off.

This will happen to whatever notification that hides itself,
e.g. a GMail notification, which vanishes when you read the
e-mail on another device. This too will trigger this issue.

-----

This patch prevents the bar from collapsing, as consequence
of removing the last notification, when Quick Settings is
showing.

Change-Id: I8c7c015c836810a465268b25b90c9166c4485a9f
Services: Adding HSPAP info in Android

HSPA+ management is missing in GPS Loc service.

Change-Id: If828c1b078d5989f501c3eb917a573a6db773453
Author: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Regnier, PhilippeX <philippex.regnier@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 41786
frameworks/base: vectorize Bitmap operations

Enable gcc vectorizing optimizations for Bitmap operations within
libandroid_runtime.so.  Adds -ftree-vectorize -mvectorize-with-neon-quad
-fprefetch-loop-arrays to functions and compiles Bitmap.cpp in ARM mode
(necessary to enable vectorizing optimizations) for appropriate targets.

Change-Id: I12defef6f47adf41af849df6e750097f5906d92d
SystemUI: Fix dock battery icons for phablet UI

For mdpi devices, the dock battery icon in the status bar is too large and do
not match the size of the stock battery icon:
http://img835.imageshack.us/img835/8207/screenshot2013020910320.png

This fix will have the battery dock icons resized to the right size:
http://img546.imageshack.us/img546/8302/screenshot2013020910233.png

Change-Id: Ic6ec875f4ebe29b33edf6cba6997db0ea1b70aeb