Bring the baby back: longpress back button to kill the app [1/2]

this old CM baby (made by @rascarlo) is still useful till
kufi does his magic on the navbar :D

Change-Id: Ic8a94679226cc5f575bd670251db978797af96d0
Quick tiles panel: Power menu button [2/2]

Original source by rastapop rom

Change-Id: I1abf27c53981ef6fb159d06081a63706dcd6844e
Bring another baby back: longpress recents to go to last app

Thanks again to CM.
Some anim optimizations thanks to Mahdi rom.

Change-Id: Ic09d727a4c74b9c6ca8837991f6f17536deb46a7
Disable Lots of Debugging

Revert "Debugging: Enable All Debugging until GPS bug is Squashed"

This reverts commit a7e2e0bfc70c866645c2f45df2ab06030c7e1131.

Change-Id: I9836dd477009ece01dda6a4feaaf00d1f7a3bfd5
From: Optipop rom
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
Frameworks: port SlimSeekBarPreference to SlimLP

Change-Id: I84c16cee9162a3fd53c0b62398a2ca03415ce974
[1/2] Frameworks: Doze (ambient display) timeout

Change-Id: I0eb230020da9a306e089b58db9d48b18c9743c0f