From a35249569e550bc674d7956073ba7292386c0879 Mon Sep 17 00:00:00 2001 From: Riley Andrews Date: Tue, 15 Jul 2014 20:39:41 -0700 Subject: Remove the /dev/.booting file before triggering boot. On mako only, there is a race condition such that core + main services must be started after releasing ueventd (by removing /dev/.booting). bug 16304711 bug 16333352 --- rootdir/init.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index bbce64ff..8eef76b3 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -184,11 +184,12 @@ on late-init # issued fs triggers have completed. trigger load_all_props_action + # Remove a file to wake up anything waiting for firmware. + trigger firmware_mounts_complete + trigger early-boot trigger boot - # Remove a file to wake up anything waiting for firmware - trigger firmware_mounts_complete on post-fs # once everything is setup, no need to modify / -- cgit v1.2.3 From ef3e3a30476417073105ac436811b247a85c8502 Mon Sep 17 00:00:00 2001 From: Riley Andrews Date: Tue, 15 Jul 2014 20:39:41 -0700 Subject: Remove the /dev/.booting file before triggering boot. On mako only, there is a race condition such that core + main services must be started after releasing ueventd (by removing /dev/.booting). bug 16304711 bug 16333352 --- rootdir/init.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index bbce64ff..8eef76b3 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -184,11 +184,12 @@ on late-init # issued fs triggers have completed. trigger load_all_props_action + # Remove a file to wake up anything waiting for firmware. + trigger firmware_mounts_complete + trigger early-boot trigger boot - # Remove a file to wake up anything waiting for firmware - trigger firmware_mounts_complete on post-fs # once everything is setup, no need to modify / -- cgit v1.2.3 From 767dee2d39cbd10d13c2abe51f62d5986ca66e43 Mon Sep 17 00:00:00 2001 From: Jon Eklund Date: Fri, 20 Jun 2014 16:03:18 -0500 Subject: audio.h: Add "safe speaker" device for limited-loudness use cases Bug: 17319721 Change-Id: Ie1af5b73258f8a0009c3bc3cecb3e0e8b2262ed7 --- include/system/audio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/system/audio.h b/include/system/audio.h index 1c702402..0eb28b00 100644 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -585,6 +585,8 @@ enum { AUDIO_DEVICE_OUT_FM = 0x100000, /* Line out for av devices */ AUDIO_DEVICE_OUT_AUX_LINE = 0x200000, + /* limited-output speaker device for acoustic safety */ + AUDIO_DEVICE_OUT_SPEAKER_SAFE = 0x400000, AUDIO_DEVICE_OUT_DEFAULT = AUDIO_DEVICE_BIT_DEFAULT, AUDIO_DEVICE_OUT_ALL = (AUDIO_DEVICE_OUT_EARPIECE | AUDIO_DEVICE_OUT_SPEAKER | @@ -608,6 +610,7 @@ enum { AUDIO_DEVICE_OUT_SPDIF | AUDIO_DEVICE_OUT_FM | AUDIO_DEVICE_OUT_AUX_LINE | + AUDIO_DEVICE_OUT_SPEAKER_SAFE | AUDIO_DEVICE_OUT_DEFAULT), AUDIO_DEVICE_OUT_ALL_A2DP = (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | -- cgit v1.2.3 From 66d2f07a0f94055d65b94707646f471df3e74137 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Wed, 15 Oct 2014 23:38:17 -0700 Subject: Fix toolchain issue for windows build of libziparchive. With mingw 4.8, the new default packed behavior is broken and makes zip archive fails due to unexpected misalignment in CentralDirectoryRecord. This patch uses -mno-ms-bitfields to revert to the old packed behavior. Change-Id: Ic977c841e330e19451db1d31ddb22e570a525062 --- libziparchive/Android.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libziparchive/Android.mk b/libziparchive/Android.mk index 705caa5a..d23a94fd 100644 --- a/libziparchive/Android.mk +++ b/libziparchive/Android.mk @@ -42,6 +42,9 @@ LOCAL_C_INCLUDES += ${includes} LOCAL_STATIC_LIBRARIES := libz libutils LOCAL_MODULE:= libziparchive-host LOCAL_CFLAGS := -Werror +ifneq ($(strip $(USE_MINGW)),) + LOCAL_CFLAGS += -mno-ms-bitfields +endif LOCAL_MULTILIB := both include $(BUILD_HOST_STATIC_LIBRARY) -- cgit v1.2.3 From 784534195536871b623691fa3505f5773b1c79f0 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Thu, 16 Oct 2014 10:14:58 -0700 Subject: Fix windows specific behavior of FileMap The implementation of the FileMap destructor would close the file, only on Windows, which did not match the behavior on mac/linux. This is because calling munmap does not close the file descriptor. It must be closed separately, before or after munmap. On Windows, the file must also be closed manually, before or after closing the mappingFile. The change basically removes the closing file from the windows-specific part of the destructor, to make behavior more consistent on all platforms where the caller to FileMap is responsible for closing its own file (since FileMap receives an opened file). Change-Id: I5e3cfffbb870d5f3595802ccac57dbc1dbf1ce6e --- libutils/FileMap.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libutils/FileMap.cpp b/libutils/FileMap.cpp index be4b14fe..f8d6bdab 100644 --- a/libutils/FileMap.cpp +++ b/libutils/FileMap.cpp @@ -77,7 +77,6 @@ FileMap::~FileMap(void) if (mFileMapping != INVALID_HANDLE_VALUE) { CloseHandle(mFileMapping); } - CloseHandle(mFileHandle); #endif } -- cgit v1.2.3