Audio: Restore volume for all streams on headset connect/disconnect

Audio streams which play sound from both speaker and a connected device would
report to AudioService only the speaker as the playback device, meaning volumes
would not be saved for a separate device state. This patch makes it so the
connected device will be reported instead, fixing volume restore on device
change for those streams (alarm, ring, notifications).

Readded safe headset restore capping for all streams.

Patch Set 3: Changed cap to 10/15

Change-Id: Id2e690f7894475ba0086f62342b8eeb163d24da1
WebView: fix crash when moving cursor
Owner: Pawit Pornkitprasan
From: http://review.cyanogenmod.com/#/c/22595/1

Patch set 2: cleaned up, added original author

Signed-off-by: R4INS <joshbr85@gmail.com>
Change-Id: I693548599a3e9f3a9c1908a725942ec219bc4f57
small tablets: add nav bar battery bar locations

Small tablets such as grouper use the sw600dp layout
for navbar. Add the battery bar layout items to show
the battery bars on this configuration.

Change-Id: I4265c8c6c71b9ffe57d86c3c3b6e3848a03d6cc2
Merge "small tablets: add nav bar battery bar locations" into jb
Merge "Audio: Restore volume for all streams on headset connect/disconnect" into jb
Fix SkBitmap::fPixels not being locked correctly

In some cases bitmap's pixels where freed during encoding, which
caused a null pointer dereference.
This fix makes sure that underlaying buffer is locked for the whole
process of compression.

Change-Id: I0ac56821f5d333072271dc2670fa30f1562adfa3
am: Don't crash if cacheDir can't be created

 * Due to a bug in the multiuser code, it's possible for us to reach
   here by loading framework-res for a different user in which case the
   cache dir can't be created.
 * Add a null check to avoid the crash and subsequent lockup of AM.

Change-Id: I12f3a207d9fa0111286a67e29652f808ad5d9410
SystemUI: add signal text (1/2) WIP

Change-Id: I0b1a246f4744e71fb6cebfdfe2f674958971048e

SystemUI: replace signal bars with signal text if option chosen

Change-Id: I3b50747031f6e80edcad4499f0ad2646483c94c0

fix airplane mode with SignalText
Took the visibilty checks out of SignalText.java and moved to signalClusterView.
Airplane mode icon now properly responds.

Change-Id: I4e97854a3ed59df26d12b881b73b8f59c75de3db

fix Dbm signal readout for LTE/4g
This uses deprecated methods for getting signal values, but
it is the way it's currently being done in Settings.apk in AOSP.
there is no LTE functionality in the new preferred method.  Until
such time as LTE signals are exposed, this looks to be the only way.

Clean up
I forgot to take out the log statements and delete
commented out code.

Change-Id: I96fe28fdf946e1372ec4dd8df3adae4aece4b509
SystemUI: WiFi Signal Text

Change-Id: I926787c92d8f054370a231ecd668a4bf352d832f
SystemUI: Add option to hide signal bars

Patch set 2: add an observer to apply the changes without reboot

Change-Id: I93e78d48412e1a82a271d002066fa8a4c0101d16
Merge "Fix SkBitmap::fPixels not being locked correctly" into jb
Merge "SystemUI: add signal text (1/2) WIP" into jb
Merge "SystemUI: WiFi Signal Text" into jb
Merge "SystemUI: Add option to hide signal bars" into jb
Volume music controls (1/2)

Switch tracks with long press of volume rocker

Patch set 2: Make play nice with vol rocker wake.

Change-Id: I21b58032c2e4d05f86a1e7b9bd8898726a80b1f4
Merge "am: Don't crash if cacheDir can't be created" into jb
Navbar: Allow for up to seven navbar buttons

Tablets and possible some devices I.E. the SGS3's and the note
prolly have enough room for more navbuttons. This is controlled via
overlay for now.

Change-Id: I571d574ec64a00853c762cefb8ef9fc499bb6c4a
LED: add LED brightness control (2/3)

Add setting to store selected brightness

Change-Id: I9a338f4ed27e3dad05b3ee0d75f2aa5481117211
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Kill App on Long-Press Back Key (framework)

Change-Id: Ib78fff9e32d95a0a112ddd9274b79b3a3aa626b9

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Long press to kill

Bring changes done in cm7 to ics.
- Vibrate on press
- Show message
- http://review.cyanogenmod.com/#change,5191,patchset=2

Change-Id: Ib1e5eba50cef5d72d81b733f87ac39c09d4212de

Long-press back kill app cleanup

Change-Id: Ida791dca1fbfdc2beccf6ff727b67df56f1956a4

framework: customizable kill app via back key timeout

Allows the time it takes for the back key to kill an app
to be customized via overlay.

Change-Id: Iaa43f81ee448ae7a7663254a830011a0bca5e60f

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: Ida791dca1fbfdc2beccf6ff727b67df56f1956a4

Framework : Long press kill fixes

Jellybean introduced changes to systemui's privelege level.
This patch hardcodes a check to avoid killing it.

Patchset 2 : Minor fix
Patchset 3 : Check length of pkgList rather than apps
Patchset 4 : Vibrate on kill

Change-Id: I24af510a62cae9acc29504912fb133825bb67bb6

Framework : Long press back to kill fixes

- Only show message / vibrate if an app was actually killed.
- Escape out of the outter loop as well upon killing an app

Change-Id: I8c1ea2070e8b4b51caab0f6e2b7d31475d1f4601

Kill app back-button : Don't kill default launcher

Avoid killing currently set default launcher.

Change-Id: Iaa2de02cfa1b94faabbb1ca86a01f185a55c5e93
framework: hide NavBar on demand, and basic Nav controls in Power Dialog.

This also fixes re-sizing of the NavBar on demand.
TODO:  Still need to find a way to 'Poke' the Notification shade.
It will not respond to NavBar resizes until rotate or other re-draw
event.

Patch set 2: Clean up and rebase

Change-Id: I37eead1415475e3c6b96daaeab4d99303e861541