extend PreferenceActivity for title text on a single pane mode

startPreferencePanel() ignores titleText on a single pane mode
this commits extends PreferenceActivity by adding EXTRA_SHOW_FRAGMENT_TITLE_TEXT to intent

ported from CM9, http://review.cyanogenmod.org/#/c/14919
AOSP part verified, but not merged

Change-Id: Ie0702dc20b17504148f4da9cc83a6d7865d95423
bluetooth: prevent Android restart with buggy devices

Change-Id: Ic15687b6870dcbe44e6bf54755174ed8aadffc9b
PIN Lockscreen: Fix mdpi layout issues

Before: http://i.imgur.com/qmsy8Sr.png
After: http://i.imgur.com/rzHtwu4.png

Change-Id: Id718fde086ec5a9cebe75307d3668a54a38a37c5
Signed-off-by: kyryljan-serhij <kirilyan.sergei@gmail.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
Lockscreen Media controls: Fix mdpi layout issues

Before: http://i.imgur.com/56jXhXG.png
After: http://i.imgur.com/wQJV3M1.png

Signed-off-by: kyryljan-serhij <kirilyan.sergei@gmail.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ib3f23a8e2d7e545495d78fe3e6b5a5b8d0adfac9
FM Radio: do not try to change thread priority

The FM Radio services try to change the current thread when
instantiated, for unknown reason. This actually ends up changing the
priority of SystemServer's main thread. Probably a bad idea. This is
the cause of the various glitch fallout after the FM Radio merges.

Change-Id: I292aff3380c717ff1bc7d45f6303c0d330ef642d
Merge "FM Radio: do not try to change thread priority" into jellybean
FM Radio: avoid deadlock when disabling RDS

When RDS is being configured, the session mutex is hold. However,
when it is being disabled, RDS callbacks might still fire, and these
also try to hold the mutex, leading to a deadlock.

Temporary unlock the mutex while the vendor library is called to
work around.

Change-Id: Ic9751c7185fd8de4a7510225f54d23a22f042321
Merge "FM Radio: avoid deadlock when disabling RDS" into jellybean
Merge "PIN Lockscreen: Fix mdpi layout issues" into jellybean
Merge "Lockscreen Media controls: Fix mdpi layout issues" into jellybean
Merge "bluetooth: prevent Android restart with buggy devices" into jellybean
Lock screen weather : Switch to new yahoo api

Use YQL since where.yahooapis.com seems to have been shutdown

Change-Id: I53c981383ea6836466ef854b1e2f1db17493e812
Allow USB notification to show when primary SD allows UMS and MTP

Previously if primary SD is set to allowMassStorage="true" the USB
dialog would never show.  This checks if persist.sys.usb.config is
set to mtp,adb and then allows the USB notification to show. With
this you can then have the option to select from MTP, PTP and Mass
storage when clicking the pull down notification. When Mass Storage
is selected it activates the USB connected dialog to turn on USB
storage. When set back to MTP the USB connected notification disappears.

Change-Id: I2287075ec93cae75f19e8fb59965d9dddb234aca
Turn auto attach on/off when we attach/detach.

Some network operators will detach after a timeout period, isDataAllowed()
will not allow a data connection because mAutoAttachOnCreation is false
and gprsState is not STATE_IN_SERVICE.  This change toggles
mAutoAttachOnCreation based on attach/detach events and data will be
allowed if gprsState == STATE_IN_SERVICE or mAutoAttachOnCreation.

Bug: 7491805
Change-Id: If41c2514ebdb9cd2fba88eef692f2c7160c04b0f
Merge "extend PreferenceActivity for title text on a single pane mode" into jellybean
Rework thumbnail handling

Since ids of media file are usually not continuous, the original file of thumbnail are
sparse. When there are big numbers files on ex\
ternal storage, the size of this file will be horrible.
Ex, when the id is 20000, then the .thumbnails/.thumbdata3-xx file will be 50000*10k = 488.28M.
Can refer http://stackoverflow.com/questions/12396715/android-huge-thumbdata4-file-in-dcim-folder
Because after 4.0, MediaProvider will scan any files, this will be a big problem. So I modify MiniThumbFile.java to avoid this.
According to the id, we now produce an index file. In this index file, one id will use BYTES_PER_MINTHUMB_INDEX(8) bytes in offset (i\
d+1)*BYTES_PER_MINTHUMB_INDEX. The data of these 8 bytes is the index of thumbnail file. The first BYTES_PER_MINTHUMB_INDEX bytes kee\
p next available index. And when you need insert a thumbnail, the index increase by 1. In this way, the block data in thumbnail file \
will be continuous. And thus unnecessary zero paddings will not be saved.

Change-Id: I66005dd69b0a5c8f4353bd7a8225d163a654fd2d
Merge "Allow USB notification to show when primary SD allows UMS and MTP" into jellybean
Merge "Rework thumbnail handling" into jellybean
RIL: Add compatibility with qcom's DSDS

Devices with radio libraries built against a DSDS-enabled qualcomm
BSP (anything in the last 4 or 5 months, apparently) have a slight
incompatibility in the RIL protocol: it expects the first 4 bytes
of the datastream to be the slot's identification (even if the
device isn't dual-SIM). Absence of those 4 bytes will make the
connection hang.

Change-Id: I1b28dfc9a7a3f09e1461506de8d556513cee41ed
telephony: update Sony RIL

* add support for newer qcom ril with DSDS

Change-Id: I1d725f7a6253e6665841b2298d6f9c95feebc475