services: fix memory leak in ColorFade

original patch from
   https://code.google.com/p/android/issues/detail?id=79729#c177

i can not get the email to add proper authorship, but all credits belong
to this person

Change-Id: Ica9a4ae02cd3c8435f46dd9c3bfdb52317f9a7ef
ColorFade: Fix memory leak when screen turns on/off

See https://code.google.com/p/android/issues/detail?id=79729#c177

Signed-off-by: Andre Saddler <ayysir@aospal.com>
Change-Id: I88c2366c8a10b074b58169ee5fc05c12e8d05a9b
Long pressing recent switch to last app (Remove Custom animation)

thanks to @snak3ater / SimpleAOSP

Change-Id: Ia447e2146b088c765b96e2331f8c0f4f14183e9d
Fix bugs regarding delay the dispatching of non-wakeup alarms

checkAllowNonWakeupDelayLocked() method determines that delay the dispatching of non-wakeup alarms.
(there are no wakeup alarms and the screen is off, it can delay until the future.)

if there is any pending non-wakeup alarms, non-wakeup alarm delivery time is bigger than nowELAPSED.
but, checkAllowNonWakeupDelayLocked() returns false and non-wakeup alarm is not delay until future.

i think it is necessary to reverse the inequality symbol on "mNextNonWakeupDeliveryTime > nowELAPSED"
if it isn't, Could you let me know when we get ¡°stuck in a loop¡± in the comment of checkAllowNonWakeupDelayLocked () method?

Change-Id: I7e972064547f4d0a9b4175dbd4cf735b4837abfd
Signed-off-by: Minho Choo <minho.choo@lge.com>
[ActivityManager] Fix NPE when start activity

Symptom:
NPE occurs in line 1184 (resultStack.sendActivityResultLocked)
because resultStack is null.

Root cause:
When starting activity with FLAG_ACTIVITY_FORWARD_RESULT flag,
the resultRecord could be updated, but the resultStack is not
updated as well. In that case, the resultStack is still be
null. The exception will occurs if the activity is not
granted to launch due to permission denied.

Solution:
Update resultStack when resultRecord updates.

Change-Id: I91634e4f713c2e8dbd1a71f358a8fd9beed83ec7
Avoid tearing down process groups twice.

The second removal always triggers a warning.

Change-Id: Ieafa8374dbffdaff0d576de004a688cae6f8ac18
Enable native tracking for RS contexts to improve GC behavior.

This should prevent apps from leaking RS contexts as easily.

bug 18579193

Change-Id: I2d943ce4443ce7cb90ebdd3dd37d338eda6df3a2
SystemUI: This TODO can be solved actually

Change-Id: I93a2b3cc86592d551a1ab7637f898c1c81d3d344
Signed-off-by: BigBrother1984 <carlosavignano@aospa.co>
tethering: updated ipv6 tethering

Add or Remove Upstream IPV6 interface asynchronously by listening
for change in Link Properties for IPV6 addresses.

Change-Id: I12c5dcea324755c850262a1bb84b1bb9ef835555
CRs-Fixed: 758975
SystemUI: improve brightness slider behavior

Mimic the brightness slider behavior in the statusbar.
This adds logic to make the statusbar slider also work with automatic
brightness mode enabled and it will instead adjust the temporary automatic
brightness overrride.

Change-Id: I78814a785decc83df94844fcc2f489c8cbec2b65
Signed-off-by: Roman Birg <roman@cyngn.com>
Recents: option to disable searchbar [2/2]

code by ProjectDISCO rom  @yashade2001

Change-Id: I04e4906c3f310802952411e4d7295b2d74ea8859
ezio: move the entry under Interface instead of Display
SystemUI: status bar brightness: store value as int

Non-automatic brightness value is stored as int, not float.

Symptom: adjust the brightness in the status bar, the brightness
         slider in the notification bar will always be set to full

Change-Id: I5f9a6e97bae2c44c3aff7c9222186a6dbda5d902
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>