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
Merge https://github.com/AOKP/frameworks_base into jb