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
Init: Modify user/group option for bootanim

Change the user to media and add audio group for
bootanimation to support both audio and graphics.

Conflicts:
rootdir/init.rc
Change-Id: Ia716c24a413a161e2995543ca503e0175aa1d041
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
charger: check the charging_enabled at the beginning of power off charging

Check charging_enabled flag in power off charging process, reboot the
device if charging is disabled to exit power off charging mode.

Change-Id: I11208acb1dd82a06b42911fdbcc7e58f6f97e96c
QuickBoot: Charger: support poweroff charging under QuickBoot mode

Add mode support in healthd charger options to support poweroff
charging under QuickBoot mode.

Change-Id: I0f7b83baecb8ee68d7a9a83259a0f4a0d10848bf
libusbhost: Skip /dev inotify if /dev/bus/usb already exists

Skip watching /dev changes if the final /dev/bus/usb already
exists.  Register only for /dev/bus in this scenario on systems
where the last "/usb" path may be deleted (currently handled by
libusbhost).

Removal of inotify watch on /dev reduces runtime overhead as
/dev nodes are modified frequently.

Change-Id: I6823a68c3977ae01832808ae5f8c32fa913b02cf
system/core: Remove AID_GRAPHICS from adb groups .

Remove AID_GRAPHICS from adb access groups so that
framebuffer access is restricted.

Change-Id: I9ff4318b55555bd9370192707d1344423b14c976
system: core: Add uevent support for dvb devices

Broadcast applications expects dvb devices to exist
in specific location.

Change-Id: I521f2957147428b7812ca1fb8fb6c49f44cdb8d1
camera: Add ifdefs for extended face detection fields

Change-Id: Iab51c3f269a83e626cfa613ffc73d4fbac62deaa
core: Add QCOM_LEGACY_UIDS ifdef

 * qcom_oncrpc user is deprecated. We should align with upstream.
 * Define this if you still need the legacy behavior.
 * Also remove extra definition of qcom_diag

Change-Id: I802434899b99b652ed1c1111c983edae052250da