audio: add support for incall music

- Define AUDIO_STREAM_INCALL_MUSIC to support
  incall music

Change-Id: I11319f3120a4243803ec2f8b8fc024f696a8a7da
Add optional target-specific LD_PRELOAD to environment

Append additional libraries defined in TARGET_LDPRELOAD to the
LD_PRELOAD environment if it is defined.

Conflicts:
        rootdir/Android.mk
        rootdir/init.environ.rc.in

Change-Id: I6bbf35caa71e80f635214259668a13d6efae9cce
Copy the ETB dumps and maps file to /data/core

On enabling the persist.debug.trace, ETB maps and dumps will be
copied to /data/core only for the first crash.

Change-Id: I521ee02e30ce1b4ebaca2c6b398c828286a5115d
audio: add support for extended audio features

- Add extended enums for audio stream, audio
  source, audio format, audio channel, audio
  device, and audio flag.
- Update audio API's to support extended features.
- Add new API's for compress offload playback,
  capture, and VOIP features.

Change-Id: I8dfd64ac39ee392993e2b977907cd8280952460f
audio: update enum for AUDIO_FORMAT_DTS

- update enum for AUDIO_FORMAT_DTS

Change-Id: Id8173c43090f514b673264f0b42c3bb65c051c50
Adding use_small_bufs boolean

-apq8084 HAL expects use_small_bufs to be present

-variable is not being assigned to anything as this
  is needed for fix compilation

Change-Id: I59430dffe84e20ed965cb8053cfe7f03626171d8
Revert "adbd: Don't close/reopen FFS ep0 on disconnect"

This reverts commit b5d385f1ef38ad0c163598c3a4e167d4ae9df3c6.

Commit b5d385f "adbd: Don't close/reopen FFS ep0 on disconnect"
fixes USBCV chapter 9 failures due to re-enumeration as part of
reopening FFS ep0 handle. This was done from usb_kick function
which gets invoked whenever adb read/write fails.
But, not allowing USB re-enumeration on real IO failures results
in adb to go offline and only way to recover is by re-connecting
USB cable.
As ADB function is used for debugging and USBCV tests are not
mandatory, hence, revert original change to allow USB
enumeration on any read/write failures.

CRs-fixed: 689512
Change-Id: Ic0b38223761b7c0eb3e2c54328e88010297318fb
fs_mgr: wait for device-mapper control file

When setting up a verified mountpoint, wait for the /dev/device-mapper
control node to appear.

Change-Id: I50bb64213fe08ba7b552055045d35915903fb532
healthd: Update battery status before the mainloop

If the alarm is the first event to trigger, the charging animation won't
be seen before that when healthd working at off mode charging.

Do the periodic chores and heartbeat before the mainloop, this makes
battery status be updated immediately and charging animation shows timely
in off mode charging.

Change-Id: I48268930469069882b8e4efafa6d063f8e8e8dd2
healthd: charger: Add tricolor led to indicate battery capacity

Add led to indicate battery capacity when doing off mode charging. The
led behavior is design as below:
   i. 	Shows red led if capacity is lower than 15%.
   ii.	Shows yellow (red + green) led if capacity is
	lower than 90% but higher than 15%.
   iii. Shows green led if capacity is higher than 90%.

Change-Id: If637defec8a04e859b00a6492ec1f95d6bff2200
healthd: charger: Turn off charging animation by power key event

Currently, the charging animation can be turned on by power key event. Add
support to make charging animation can be turned off by power key event.

Change-Id: Icc8101ae3d4fd777efedeff10ca535a9e6e7a57d
healthd: charger: Draw battery capacity in charging animation

Draw a text to show the battery capacity value in charging animation.

Change-Id: I0117fb0aee69181ce0d608ba4b1644fa42cd1a0d
healthd: charger: Modify charger unplug shutdown time to 1s

Modify UNPLUGGED_SHUTDOWN_TIME from 10 seconds to 1 second to make sure
device can shutdown quickly after charger is plugged out.

Change-Id: I73f149295ca73756a210e7cb3dd61f955aa18165
init: add 'ffbm' action trigger when booting in factory mode

Android init process was extedned to recognize new boot mode
and start only required services for this mode. Init process will add
new action trigger 'ffbm', which will take care of rest of the
initialization process. 'ffbm' action trigger is defined in Qualcomm's
private init.rc file. It's functionality is identical with main
Android's 'boot' action triger except it doesnt add trigger actions
'core' and 'main'. Action trigger will start only minimal set of
services (media, adb, qcom-post-boot, rmt_storage) required for test
environment to operate correctly .

Change-Id: If74201f83d663e2f2932720cc3ecb494a61a854e
Added No Follow symlink option to chmod.

Enable symlink to not follow target file if "-h" option is
provided.

Change-Id: If6423ceb8474fe6c48229a16568dc07ea4754b6c
healthd: charger: Support alarm in power off charging mode

To implement this feature need to let the phone reboot some time
earlier than the alarm time.

CRs-fixed: 727939
Change-Id: I67832ec089eddd436a4daee7c6808ab2eaa69213
healthd: charger: Add backlight control in charging animation

On some targets the FBIOBLANK does not control the backlight. Add the
backlight control in charging animation to make sure the backlight will
be turned on/off successfully.

Change-Id: I3bba3b58daba6cffa4eb1314a6da1542f43e8e47
ueventd: Add bootdevice links support for selinux

Adding bootdevice support to define context on common symlink.

Change-Id: I25d7239614539d1ef2c9920e2c321824ee2c664b
system/core: Add flag for HDMI compressed passthrough

Add audio output flags to support compressed passthrough over HDMI
for DD/DDP contents.

Change-Id: I308eca2c250591e3e3d6d6d28b6f67440ae3310d
system/core: Add support for JOC format

Add support for EAC3 JOC format to core. Add EAC3 JOC format as a
valid format.

Change-Id: I2a396a570421c66df84a874cde6f3616392c6ba1