am: Allow more hidden apps on devices with lots of RAM

 * If more than 1.5GB is present, allow up to 40 hidden apps.
 * Number is somewhat arbitrary, but was found to work well on D2.
 * Also look at the sys.mem.max_hidden_apps value if given.

Change-Id: I2d3cf6e0dad1bc0b482cc37bf9c61ed2f2b4be51
Merge remote-tracking branch 'upstream/ics' into ics-plus
Legacy FM stream support

Add stream type STREAM_FM for legacy FM radio volume control and
audio routing.

Change-Id: Id08a802e84761d81ded09994126290c7ee8bbf4c
Set FM volume

Change-Id: I6d93cf1b53642c55765c14a14f29192867fcd40b
Fix alignment and copy size for legacy QCOM OMX (from https://github.com/grigorig/)

Change-Id: I5fa6e57fe213a534a0def6d8c21c2f1475982e65
Prefer 16bpp formats for opaque bitmaps

Configure BitmapFactory to prefer RGB565, which will make it
use that format for all opaque assets loaded by it with standard
settings. Toggle dithering flag in strategic places and reenable
16bpp drawing cache, to speed up software UI rendering.

(Original author: Grigori Goronzy <greg@blackbox>)

Change-Id: I292f77a4481e86964255d7b59c9407f5e99a8e08
Prefer 16bpp surface formats

Adds a property to use RGB565 surface formats for the opaque
surface default, enabled by default.

(Original author: Grigori Goronzy <greg@blackbox>)

Change-Id: Ia5aa00b9fcb197d25f7107a569103389a0337eb3
Use RGB565 surface for wallpaper

The framebuffer only uses 16bpp on most legacy devices anyway, so this
does not result in worse quality. It saves a lot of GPU fillrate and
memory, though.

(Original author: Grigori Goronzy <greg@blackbox>)

Change-Id: I0133dec0ee0e122248027b422ba13b03f55e57a9
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