[1/2] Frameworks: Doze (ambient display) timeout

Change-Id: I0eb230020da9a306e089b58db9d48b18c9743c0f

Conflicts:

	core/java/android/provider/Settings.java

(cherry picked from commit c62ae20bc786cb4189c960588b0fa36f12cfdc63)

Conflicts:
	core/java/android/provider/Settings.java
Frameworks: port SlimSeekBarPreference to SlimLP

Patchset: materialize slider preference
Change-Id: I84c16cee9162a3fd53c0b62398a2ca03415ce974
(cherry picked from commit 1095c308b8fcf58199cf90aa4c0ae2b5e91c430b)

Conflicts:
	core/res/res/values/cr_strings.xml
Add more toast animations

(cherry picked from commit 6b9fca0cf3284a909c0c53db3fe2ba4af35e82a5)
MountService: allow overriding default storage list with ro.storage_list.override

Useful for devices with different storage layout variants, e.g. with
either emulated or non-emulated sdcard0.

Change-Id: Ia44ef6243563a69cb8d38a7b87bd81cd37f1df63

(cherry picked from commit 455e22904d911bd24f5c3b3c5c349a70f6751160)
services: AssetAtlasService: prevent IndexOutOfBoundsException

Change-Id: I319903e8d763b9f48dc675676f27f3fadc4f3de5

(cherry picked from commit 3f144e820c5e173925e4ebc5c10ee66ac6c5a6a1)
SystemUI: This TODO can be solved actually

Signed-off-by: BigBrother1984 <carlosavignano@aospa.co>

(cherry picked from commit 94f4a58d1a69609271fa6e2949a2a28697fd8195)
Avoid tearing down process groups twice.

The second removal always triggers a warning.

Change-Id: Ieafa8374dbffdaff0d576de004a688cae6f8ac18

(cherry picked from commit d5e2747eae1fc8909963008410b9367b4a070063)
SystemUI: Tiny expanding improvement

Signed-off-by: BigBrother1984 <carlosavignano@aospa.co>

(cherry picked from commit ec1f67b7b4d0477e945489582e5627f84e9bbc17)
JDK8: Fix ambigous call to MediaProjectionManagerService.dump

Change-Id: Iee3388dd79d8274b5be499b79689f132df3a36ce

(cherry picked from commit 9b4162718771be3ea643d3459955c8a7e23439fe)
Fix memory leak in system_server when screen on/off

Change-Id: I3ed7be519fc9301dd45d162773a6d0d62de12d76

Patchset: 2
http://review.cyanogenmod.org/#/c/82572/

(cherry picked from commit d644fb9d0526a1fe6749d5babda40b66ce002ab8)
Layout the config-changed window if it has surface

This patch fixes an issue which caused the resumed app to get the
wrong frame at first.

https://code.google.com/p/android/issues/detail?id=82242

Change-Id: I4483029326afca143e7921f3b9563da4f566d2e5

(cherry picked from commit 6380023e854c0632bb84011288a3731d29dbd244)
Prevent AudioService dead lock issue.

Dead lock sequence:
 1. called onSetA2dpConnectionState()
  1-1. synchronized(mConnectedDevices)
 2. called onServiceDisconnected()
  2-1. synchronized(mA2DPAvrcpLock)
 3. waiting to lock(mConnectedDevices) in onServiceDisconnected()
 4. waiting to lock(mA2DPAvrcpLock) in onSetA2dpConnectionState()

========================================================================================
- watchdog issue
----- pid 3306 at 2014-10-14 16:15:12 -----
Cmd line: system_server

"main" prio=5 tid=1 MONITOR
  - waiting to lock <0x4343e9b0> (a java.util.HashMap) held by tid=46 (AudioService)
      at android.bluetooth.BluetoothA2dp$2.onServiceDisconnected(BluetoothA2dp.java:529)

"AudioService" prio=5 tid=46 MONITOR
      - waiting to lock <0x42ab7a58> (a java.lang.Object) held by tid=1 (main)
========================================================================================

Signed-off-by: Seunghwan Hong <seunghwan.hong@lge.com>

Change-Id: I99e061c07be01aabcd26786ef2ebb71f46717b93

(cherry picked from commit f45453f74d33e334125ea9c2a221ecec305e40d3)
Fix NullPointerException in BluetoothPan

Check mPanService value to avoid NullPointerException.

Change-Id: I9ca373e292b3e33360b505100222065c47195f60

(cherry picked from commit d31e11c6874c4650bcd6d8132eed59cb48821702)
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54

Patchset: 1
http://review.cyanogenmod.org/#/c/82610/

(cherry picked from commit 20b9722c17e62a748d145000eee5ee08adcf0317)
[ActivityManager] Use synchronized to protect object

Symptom: ArrayIndexOutOfBoundsException at mResourcePackages
Root Cause: Race condition issue
Solution: Use synchronized to protect object

Change-Id: Ia2d89d50919d95d95f6f8ac2eb75594a93e8f2da

(cherry picked from commit c833ff2f075a5d765c457f44a6526488f24b01f9)
Prevent wrong system ui visibility callback after the user swipe

If we return vis without clearing clearable flags, it will be set to
IStatusBarService in updateSystemUiVisibilityLw(), and then be
callbacked to WMS via statusBarVisibilityChanged(), and then be
dispatched to the client; which is wrong because WMS should dispatch
the new value to the client, not the old one.

https://code.google.com/p/android/issues/detail?id=79991

Change-Id: I2a06d1fbe66e854e639d86a39784f8c6a3303674

(cherry picked from commit db24a9dcb420fee751b043e20075dc6cc5ebf833)
Enable Dessert Cake dream

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

(cherry picked from commit fde654476f8c774e466a6cefe5d97837c1a6a41c)
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.

Rebased to cm-10.1 by Kristof Petho

Change-Id: I617d197c2ff4f1a27e96dbc206c24c27036e18d6

(cherry picked from commit a5223066c29f215e5c78427144343de3c0377166)
SystemUI: start redrawing some navbar icons, add lastapp icon

Change-Id: I0925fe7a348a8914757caaca6c97d85fb7337f7b

(cherry picked from commit a624b41c837ea3018cd91c5be45b2a4323810773)
Forward Port: Smoother Upload and Download Animation

Change-Id: I6e6409cc85ad951019dbac10156d4aed92f4c5bc

(cherry picked from commit f453a0e17b4db987a385b6f7d36f7446b1a77825)

(cherry picked from commit 3195d9087357033371385cbe3ebb47445287b4a7)