From e5549d414c7231ee0037cf413dad17e28b8905ba Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 29 Mar 2017 18:41:27 -0700 Subject: [PATCH] Switch libplatformproto to sharedlib libplatformprotos is really really unhappy if it gets loaded twice into the same process which trivially happens if it's a static library. Switch it to a shared library instead to fix this. Change-Id: I90297d076d0739bab683fbd9607d7fc0884a002d Fixes: 36272398 Test: Ran hwui_unit_test, didn't crash --- Android.mk | 3 ++- libs/hwui/hwui_static_deps.mk | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Android.mk b/Android.mk index 8daab8ff800e4..eb649c9152c3c 100644 --- a/Android.mk +++ b/Android.mk @@ -1460,7 +1460,8 @@ LOCAL_PROTOC_FLAGS := \ LOCAL_SRC_FILES := \ $(call all-proto-files-under, core/proto) \ $(call all-proto-files-under, libs/incident/proto) -include $(BUILD_STATIC_LIBRARY) +LOCAL_SHARED_LIBRARIES := libprotobuf-cpp-full +include $(BUILD_SHARED_LIBRARY) # ==== c++ proto host library ============================== include $(CLEAR_VARS) diff --git a/libs/hwui/hwui_static_deps.mk b/libs/hwui/hwui_static_deps.mk index 8826cfcc31005..7f06421b02a02 100644 --- a/libs/hwui/hwui_static_deps.mk +++ b/libs/hwui/hwui_static_deps.mk @@ -27,7 +27,5 @@ LOCAL_SHARED_LIBRARIES += \ libft2 \ libminikin \ libandroidfw \ - libRScpp - -LOCAL_STATIC_LIBRARIES += \ + libRScpp \ libplatformprotos