wifi: check if supplicant is running before starting it

Wrong property was used to check if wpa_supplicant was running.
Fix this

Change-Id: I6a5bd7a3acae84f5ba4bba317d04191e0e59b2e7
Author: Jonathan DE CESCO <jonathan.de.cesco@intel.com>
Signed-off-by: Jonathan DE CESCO <jonathan.de.cesco@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 66748
hardware/libhardware_legacy: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH

LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it
with LOCAL_MODULE_RELATIVE_PATH.

Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
Merge "hardware/libhardware_legacy: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
Merge "wifi: check if supplicant is running before starting it"
Wi-Fi HAL: fix supplicant start failed issue

init.svc.*(hostapd, p2p_supplicant) properties are set when starting
STA or uAP via Wi-Fi HAL, after sending ctrl.start command to
property_service, thread called wifi_start_supplicant will yield cpu
for android init process to get scheduled, then init.svc.* status
is read to check if supplicant status is running

there is a chance that after scheld_yield returned, init is not
scheduled, serial value is not updated, __system_property_read got
the "stopped" status, then init is scheduled to update service status
after that back to this loop in Wi-Fi HAL, serial is updated, but
status is not reread, still used "stopped", then Wi-Fi HAL will
report supplicant start failed

as the following schedule sequence:

process A(WifiStateMachine)           process B(init)
1. ctl.start
2. scheld_yield
3. __system_proerty_read
   /*serial1, value1*/
                                      4. __system_property_update
                                         /*serial2, value2*/
5. serial1 != serial2
6. value1 == "stopped"

So after sched_yield, first check if serial is updated, then read
service status

Change-Id: I5181e0d4504c525832c033b9a35bd58ec63e1de8
Signed-off-by: jiaguo <jiaguo@marvell.com>
Merge "Wi-Fi HAL: fix supplicant start failed issue"
audio policy : add AUDIO_DEVICE_IN_USB_DEVICE to sDeviceNameToEnumTable

This commit adds AUDIO_DEVICE_IN_USB_DEVICE to sDeviceNameToEnumTable[],
It had to be added here, when it was defined in system/core/include/system/audio.h

AudioPolicyManagerBase::loadHwModule() fails to parse device type of
AUDIO_DEVICE_IN_USB_DEVICE in audio_policy.conf.
By applying this commit, AUDIO_DEVICE_IN_USB_DEVICE can be used for
audio policy customization.

Change-Id: I0165956334d7105129dca4c746372dbca0d9e324
Merge "audio policy : add AUDIO_DEVICE_IN_USB_DEVICE to sDeviceNameToEnumTable"
Audio policy is 32-bit only

Change-Id: I2eca0286d98bb5eebe9c68286d4ee7ed366f173d
Merge "Audio policy is 32-bit only"