Switch to use aicu/AIcu.h

Switch to using a dynamically-linked library function to initialize
ICU, not a statically-linked function. This means the knowledge of file
paths stays in the runtime module.

Bug: 120493361
Test: build/boot
Change-Id: Ibe1d5ffd50e5cce76b1b01788954dcfb4762b1c6
gugelfrei
Neil Fuller 5 years ago
parent 0428b8e5a5
commit 9447c68921

@ -25,7 +25,6 @@ cc_binary {
],
static_libs: [
"libicuandroid_utils",
"libregistermsext",
],

@ -18,6 +18,7 @@
#define LOG_TAG "mediaserver"
//#define LOG_NDEBUG 0
#include <aicu/AIcu.h>
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
@ -25,7 +26,6 @@
#include "RegisterExtensions.h"
// from LOCAL_C_INCLUDES
#include "IcuUtils.h"
#include "MediaPlayerService.h"
#include "ResourceManagerService.h"
@ -38,7 +38,7 @@ int main(int argc __unused, char **argv __unused)
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm(defaultServiceManager());
ALOGI("ServiceManager: %p", sm.get());
InitializeIcuOrDie();
AIcu_initializeIcuOrDie();
MediaPlayerService::instantiate();
ResourceManagerService::instantiate();
registerExtensions();

@ -22,7 +22,6 @@ LOCAL_REQUIRED_MODULES_x86_64 := crash_dump.policy mediaextractor.policy
LOCAL_SRC_FILES := main_extractorservice.cpp
LOCAL_SHARED_LIBRARIES := libmedia libmediaextractorservice libbinder libutils \
liblog libandroidicu libavservices_minijail
LOCAL_STATIC_LIBRARIES := libicuandroid_utils
LOCAL_MODULE:= mediaextractor
LOCAL_INIT_RC := mediaextractor.rc
LOCAL_C_INCLUDES := frameworks/av/media/libmedia

@ -15,6 +15,7 @@
** limitations under the License.
*/
#include <aicu/AIcu.h>
#include <fcntl.h>
#include <sys/prctl.h>
#include <sys/wait.h>
@ -29,7 +30,6 @@
#include <utils/misc.h>
// from LOCAL_C_INCLUDES
#include "IcuUtils.h"
#include "MediaExtractorService.h"
#include "MediaUtils.h"
#include "minijail.h"
@ -64,7 +64,7 @@ int main(int argc __unused, char** argv)
SetUpMinijail(kSystemSeccompPolicyPath, kVendorSeccompPolicyPath);
InitializeIcuOrDie();
AIcu_initializeIcuOrDie();
strcpy(argv[0], "media.extractor");
sp<ProcessState> proc(ProcessState::self());

Loading…
Cancel
Save