fix for screenshot animation glitch in protrait

edit suggested by users Suxsem and AbhishekS on XDA.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6

Conflicts:
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
fix build

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

Change-Id: I4f01151f4051df4ae1b85fa460ec7a9e70122878
Revert "fix for screenshot animation glitch in protrait"

This reverts commit dfae59704fad99841dfb046a02aa558ea2360a31.
Quicksettings: Immersive: Fix collapse panel animation.

Right now it collapse after the ui goes into immersive mode so the collapse animation is not showed.
First collapse the panel then go into immersive mode so we see the animation.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Quicksettings addons.

* Quick pull down from right side of status bar.
* Long click action for user tile (opens sync settings).
* Long click action for rotation tile (opens accessibility settings).

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java

Change-Id: Ic7570f3f297b54d9691515783e7b280c10cca0ac
Add method to PowerManager that allows querying the lowest possible
brightness.
Used by the auto-brightness adjustment to adjust the sliders.
AudioService: Restore volumes after boot and when a headset is plugged

The correct volume levels for <device>_speaker and <device>_headset are not restored after booting and when a headset device is plugged in or out.

This fixes a glitch where the first volume change event causes the volume to be reset to the last stored value instead of increasing/decreasting it by one step.
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
PackageInfo class incorrectly referenced as a struct.

Change-Id: Ie38b2b3ed82a6d5f99b6c574af53ae5bda7371d5
Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps

The loading "spinner" animation is quite jerky by default when the progress xml's from
drawable are called in applications that don't use the holo progress animation. The holo
"spinner" animation is already smooth by default. This makes every other "spinner"
animation smooth.

We've been changing this value in all ROM's we release, both AOSP and CM based ones
as well as stock ROM's, since it gives a more polished look to the entire system. In the past
3 years we've been using this small tweak we have not noticed anything that would
adversely affect battery life or system operations as a whole.

Signed-off-by: Sar Castillo <sar.castillo@gmail.com>
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

Conflicts:
	cmds/bootanimation/Android.mk
bootanimation: fix usage of LOGW

Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701

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: Ibfd04caf019bcac9ba9f80f8c3eadca397a998d1

Conflicts:
	cmds/bootanimation/Android.mk
	cmds/bootanimation/BootAnimation.cpp
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: I65b6358d8ddda4350e1f150034c340b22aba5f27

Conflicts:
	cmds/bootanimation/BootAnimation.cpp
remove references to lightbulb

Change-Id: Ia230fc615b2a5be245faee776865b9ff541b029e
[2/2] Framework: add option to hide power menu when screen is locked

Change-Id: I0de1501d0ecedb7b9b08fbb3aebaecd0e63cc09e
fb: changed all open forgoten UI from google into new UI

thanks kroz

Change-Id: Ibc32ad8e73617dd74c8cd313dc2e071962eec966
Add support for allow-permission extension.
This will grant a sharedUserId arbitrary permissions as defined by XML files
in /system/etc/permissions.

Change-Id: I4c0be56173b89621c4cc7ae589715a030931e8d5
Development shortcut in StatusBar and Recent Panel

It enables the wipe data and application force close option in the
recent tasks list and in the notification area. These options will
be available only if the Development shortcut option is enabled.

Change-Id: Ia4e1d040e8eade5afe118dd62bc28c86381c03e6

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/cm_strings.xml