On-The-Spot: Add clear all recents button to user preferences.

PS3: Add proper drawable thanks to / by Dani Rosenkamp @DaNi--
     Fix wrong change id (from abandoned commit)
PS4: More logic drawable

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I632730bee6b409072689e07fb1084ceaca5b1d49
SystemUI: Fix Quick Settings appear when disabled

If you tap the clock on the status bar, then the next time you pull down the status bar on the
right side it will show the quick settings. Even if the user disabled quick pulldown.

Bug: https://paranoidandroid.atlassian.net/browse/AOSPA-59

PS2: fixed spacing

Change-Id: Ibb2efd27a96898ff11640c7a58c0686e2fefc75f
Signed-off-by: Parthipan Ramesh <parthipan.ramesh@gmail.com>
Add config_batterySdCardAccessibility to symbols.xml

Change-Id: I0f9dc18ddaaa52d02ba547c827db62d1d765c37f
PIE: Disable orientation sensor when we don't need it

Orientation sensor always enabled causing some device keep awake and
battery drain. This commit fix this issue.

  * Disable/Enable orientation listener when screen turn off/on if PIE
is enabled.
  * If PIE is disabled, recycle it.

Change-Id: I6bda168b3fd62d9f7047ffc3a3c6bfd08e655543
SystemUI: Fix Removed USB Storage Notification

If you have connected a OTG USB Storage to your device an disconnect it
the Notification "Removed USB Storage" appears. But you can't swipe it
off, because the Notification intent is set with FLAG_ONGOING_EVENT and
not with FLAG_AUTO_CANCEL!
In my fix I changed the boolean function variable 'dismissable' from
"false" to "true" and so the Notofication will gets the flag
FLAG_AUTO_CANCEL, now the Notification can be swiped off.

Bug: https://paranoidandroid.atlassian.net/browse/AOSPA-191

Change-Id: I01713dbcbc025d0dd2df3e6d4359507e0e31a23f
Signed-off-by: Matthias Freund <matthias88freund@gmail.com>
Merge "On-The-Spot: Add clear all recents button to user preferences." into kitkat
[TEMP] PIE: fix a freezing bug

How to reproduce:
- Enable PIE;
- Toggle between on/of;
- Without close expanded status bar click any tile that use one of this methods -> private void startSettingsActivity(String action) or private void startSettingsActivity(Intent intent);
- System will freez for some seconds and soft reboot;

Solution:
- When deteced PIE mode enabled use a runnable with a less time possible to give time to system colapse panels and perform needed actions

Change-Id: Idc5f112873aa7a31993e7a3c82a1760bb45f8b9b
Merge "[TEMP] PIE: fix a freezing bug" into kitkat
Merge "SystemUI: Fix Removed USB Storage Notification" into kitkat
Merge "SystemUI: Fix Quick Settings appear when disabled" into kitkat
fix WRITE_SETTINGS to be "dangerous"

(see http://www.fireeye.com/blog/technical/2014/04/occupy_your_icons_silently_on_android.html for an explanation why this is dangerous)

Change-Id: I8f938dc4f528aa2ccbca3d4cec235feb0299c0bd
Fix very long app_name crash.

http://ibrahimbalic.com/2014/android-os-memory-corruption-bug/ found an stack overflow bug.
The very long app_name make libandroid_runtime allocate a very large array on stack, the stack may overflow to other data areas in this situation.
This patch allocate large array on heap instead of on stack to avoid segment fault when doing memcpy.

Change-Id: I99999569b852d43a9c7a6eb1fa80e9f1a1f4e2b2
Merge "PIE: Disable orientation sensor when we don't need it" into kitkat
Merge "fix WRITE_SETTINGS to be "dangerous"" into kitkat
Merge "Fix very long app_name crash." into kitkat
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat

Conflicts:
	packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I9a7c3f2198caa580f39f5755989ce4a34237cc1f
Bluetooth: pause music player on A2dp service disconnect

When A2dp service disconnects as part of SSR, it marks a2dp state
as unavailable in Audio module but does not pause music player, as
a result when bluedroid stack restarts as part of sub system restart,
media player does not pause and music continues to play on device
speaker.
This change helps to pause the media player, in addition to marking
a2dp as unavailable, so that media player pauses when a2dp service
forcibly disconnects as part of sub system restart with A2dp in
connected state.

CRs-Fixed: 590462
Change-Id: I05ee5bcc808eb438156b64181d54e8ccabe1e186
Bluetooth: Add Total track number.

Add support to add total number of tracks in
Meta-data

Change-Id: I5b1287f791615adcd4f920fe5c7cae0c7c7b04ea
CRs-Fixed: 627869
couple fixes for msim dual sim

Change-Id: I2bd9ebdd6fa147c67e397d4cc2db1f8bfc2f5666
Signed-off-by: houst0nn <houstonn@gmail.com>
MSIM: Rework statusbar, order signal clusters to match settings

Settings have SIM 1 on left, then SIM 2, etc. Do the same in the
statusbar. Also show the sim slot number in front of each signal
cluster.

Change-Id: I6ce16870af6374958b09a8a9d7d6d510f4561e13

Conflicts:
	packages/SystemUI/res/layout/msim_signal_cluster_view.xml
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/res/values/styles.xml