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
add Settings.System boolean helper methods

Change-Id: I749d15a7c6956d938698f16ebde185b114f7f15a
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Port forward: Alternate Default App Picker / Reboot Dialog

Alternate Default App Picker
--Zaphod <mwilson@acesappraisal.com>

Reboot Dialog and subsequent fixes
--Roman <romanbirg@gmail.com>

Port to work on 4.2, apparently Google thinks it's funny to
move the ShutdownThread every rev...

Change-Id: I4ab31e6767079c3bb6a9cba0a15b36e3627e9aef
Mega FW-Kang Part1

Credits to xoomdev, jbirdvegas, brewcrewfoo/aokp

Port forward: Clock styles, carrier text, notif count

SystemUI: Clock mode. Center, Right, Hidden. AM/PM and Weekday
options.
-- syaoran12 (aka adamthecashew)

SystemUI: Notification counter
-- Stevespear426

SystemUI: Clock fix for 24 hour format
-- KhasMek

Custom Carrier Label
-- netboy3

Change-Id: Ie24eeb33b4b546586019c5f468e1a489c15bba5f

Suppress String resources build warnings

warnings suppressed are:
aapt: warning: **** string '%s' has no default or required localization for
aapt: warning: string '%s' has no default translation in

Patch Set 2: move ifdef and only suppress warnings for packages that
             define NO_DEFAULT_TRANSLATION_WARNINGS and/or
             NO_LOCALIZATION_WARNING

Patch Set 3: by default do not show warnings unless
             SHOW_DEFAULT_TRANSLATION_WARNINGS and/or
             SHOW_LOCALIZATION_WARNINGS

Change-Id: I50ef2a623959a1cc53053b446328df8e34cc99e8

BootMessage: show more info in boot dialog

Tell the users what package we are running dexOpt on currently

Change-Id: I665ab3847ec1846e40915a1fae21c43e2e7ccf6d

Add option to vibrate on notification expansion

Change-Id: Ib90d63912c3a81b0e1867893a1a0061e709883c1

Port forward: Volume rocker wake and Volume music controls

Policy: Volume rocker wake
--Stevespear426 based on roman's ICS code

Volume music controls
--gdanko

Fix volume track skip control with 3rd party applications
--Danesh

Change-Id: Ie4b5c77c6ef7fc062cd96345866db52d279345c9

ActivityManagerService: stay away from zombie content providers

When the lowmemorykiller kills a content provider in an unfortunate
moment, an innocent client app can become attached to a zombie provider
and be unconditionally killed moments after, when the dead provider is
being removed.
Prevent this race by addition of isAlive function to Process.java that
determines whether a process is still running and is not only a zombie,
add a check of the state of the provider process to getContentProviderImpl.

Change-Id: Id753b8dab103e4b447c4138468938ca9f5cb857d

ContentProviderRecord: Remove external process reference when finalized

ContentProviderRecords is removed from provider map by activity manager service
when the process hosting the content providers terminates and this causes GC
to free the content provider records but the reference to external process
using the content provider isn't cleared. Fix is to clear the reference and
unlink for death notification.

Change-Id: I67fd10cee57b02257792d0c9b4569fe11dea7648

PackageInfo class incorrectly referenced as a struct.

Change-Id: Ie38b2b3ed82a6d5f99b6c574af53ae5bda7371d5

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 NAT detection in SipService

The NAT detection in SipService just checks if the client IP is a
private address. In this case keep alive is enforced. But if you
use a server which also has a private address, keep alive should not
be enabled to save battery.
This patch modifies the NAT detection to also check the server IP.
If both are private, NAT is not detected.

Change-Id: If4baaf1866253ca6c432e5cc4b07e3ebd9de6ba1

frameworks/base: Handle Out of Memory Exception when creating video thumbnails.

Adds code to handle an out of memory exception when generating the thumbnail
from a recently recorded video clip.

Change-Id: Ifcbe007272ffef85744fca1414ea5eacccd0154c
CRs-Fixed: 277571
Signed-off-by: Shalaj Jain <shalajj@codeaurora.org>

ProcessStats: Fix another crasher

Prevent occurences of:

java.util.NoSuchElementException
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:208)
	at com.android.internal.os.ProcessStats.getCpuSpeedTimes(ProcessStats.java:574)
	at com.android.internal.os.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:546)
	at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1676)
	at com.android.server.am.ActivityManagerService.batteryNeedsCpuUpdate(ActivityManagerService.java:1728)
	at com.android.internal.os.BatteryStatsImpl$MyHandler.handleMessage(BatteryStatsImpl.java:129)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1431)

Change-Id: I66f30739455dd726b708467f814f53c445f327b2

fix NoSuchElementException error with CPU ProcessStats

Credit to Eugene373

p2: update commit message
p3: cleaned up tabs
p4: also added aosp changes from this commit - https://github.com/android/platform_frameworks_base/commit/ca894b396b93344ac255746e12730cb269d4d856

Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
Change-Id: I3c71dbd5fb8e42811c47d6431003101943cb388a

onSavePassword dialog can leak when WebViewClassic is destroyed.

The AlertDialog creates in onSavePassword method leaks if
WebViewClassic is destroyed when the dialog is shown.

Change-Id: I81f20e1dd138467a6413766c0a081b389b334ae0

[webkit] Runtime enablement of WebGL

Hook up debug setting to enable/disable WebGL.

Change-Id: I46790e61471a76eb5a8d8ff552022e12c3782204

net: customize memory cache size

Change-Id: I2b7cc83707a567676550be2639095c5bb28dc6dc

Add simple caching to XML compilation

XML compilation stage will perform many (expensive) resource ID
lookups - for the same entries. Adding this simple cache can
dramatically improve performance of this stage (often a bottleneck)

Change-Id: Ib1ab82ba9bf901bc2a3f9027b47d680861d6c315
Signed-off-by: Jorrit Jongma <jorrit@jongma.org>

Add simple caching to XML compilation

XML compilation stage will perform many (expensive) resource ID
lookups - for the same entries. Adding this simple cache can
dramatically improve performance of this stage (often a bottleneck)

Change-Id: I61356b6b3f0d90b7ac549b781e3ac8dd02282559
Updated: fixed for Mac OS X (also tested on Windows, Linux)

VPN Traffic Amount in Human Readable Format

Normally, VPN traffic amounts are registered in the amount of
bytes that have been transferred over the VPN link.  But that's
ugly, ugly for humans that is.  Most of the time people like
Kilobytes, Megabytes, and Gigabytes; not ugly Bytes.  This
modification changes that so that you get a nice way of
describing the amount of data that has been transferred over
that VPN link.

Signed-off-by: Tom Parkison <thomas.parkison@gmail.com>
Change-Id: I3cef28d63cd98aad833a9d1c9262b162e78a11ab

Add notification wallpapers

Change-Id: Ie35ee57a36e37ec5d4a303058119ffa2967e71b3

Custom NavRing and LaunchHelper

Forward port navring and launch helper

Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>