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 "Rework thumbnail handling" into jellybean
Merge remote-tracking branch 'cyanogen/jellybean' 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
Merge "telephony: update Sony RIL" into jellybean
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
fix bug: custom brightness levels only uses the first 6 values(Martin Blumenstingl)
fix auto-brightness
Lower the RAM requirement for hardware acceleration

There are legacy devices with about 365 MBytes of RAM
available to the kernel (HDPI with 512 MB RAM onboard).
Lowering the requirement value for available RAM allows
these devices to also use hardware acceleration, thus
making the UI a lot more responsive and fixing bugs like
this: https://dl.dropboxusercontent.com/u/16268774/Screenshots/Phone/Screenshot_2013-10-07-01-27-45.png
(notice the "shadow" is missing)

Change-Id: I0343ddbb3c7f95bed674b5852772ab819065ea69
Merge pull request #1 from Quarx2k/jellybean

merge