mediaserver : Initialize ICU on startup.
In change 2b29e461c in external/icu, we stopped hardcoding the ICU
data path at compile time to avoid two sets of mappings in zygote forked
processes. This means we'll have to tell ICU where its data is if the
process in question isn't forked from the zygote.
bug: 21705078
Change-Id: I829d9fa34fe8209aa8a6d55145ca26fdf0d934e8
diff --git a/media/mediaserver/main_mediaserver.cpp b/media/mediaserver/main_mediaserver.cpp
index 06b3c6e..27a40b2 100644
--- a/media/mediaserver/main_mediaserver.cpp
+++ b/media/mediaserver/main_mediaserver.cpp
@@ -31,6 +31,7 @@
// from LOCAL_C_INCLUDES
#include "AudioFlinger.h"
#include "CameraService.h"
+#include "IcuUtils.h"
#include "MediaLogService.h"
#include "MediaPlayerService.h"
#include "ResourceManagerService.h"
@@ -124,6 +125,7 @@
prctl(PR_SET_PDEATHSIG, SIGKILL); // if parent media.log dies before me, kill me also
setpgid(0, 0); // but if I die first, don't kill my parent
}
+ initializeIcuOrDie();
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm = defaultServiceManager();
ALOGI("ServiceManager: %p", sm.get());