From 9d937df36ac07c517dd80b076c5c43d450e16774 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 21 Mar 2017 10:59:07 -0700 Subject: [PATCH] Remove libtextclassifier from local shared libraries. Move libtextclassifier from LOCAL_SHARED_LIBRARIES to LOCAL_REQUIRED_MODULES so that it is still installed to the system image but not linked against libandroid_runtime. Avoids ODR issues between libprotobuf-cpp-lite and libprotobuf-cpp-full. Test: Checked that libtextclassifier is still built into the system image but not linked to libandroid_runtime. Bug: 36350884 Change-Id: I6e57b4323a84c14e05f1b9e463ce93625d9cb3d7 --- Android.mk | 3 +++ core/jni/Android.mk | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index 03b2533e8bc0c..783fa6be48ebd 100644 --- a/Android.mk +++ b/Android.mk @@ -569,6 +569,9 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ android.hardware.health@1.0-java-constants \ android.hardware.usb@1.0-java-constants \ +# Loaded with System.loadLibrary by android.view.textclassifier +LOCAL_REQUIRED_MODULES += libtextclassifier + LOCAL_PROTOC_OPTIMIZE_TYPE := stream LOCAL_PROTOC_FLAGS := \ -Iexternal/protobuf/src diff --git a/core/jni/Android.mk b/core/jni/Android.mk index af5fca2c0e429..95b2593201e63 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -286,7 +286,6 @@ LOCAL_SHARED_LIBRARIES := \ libhwbinder \ libvintf \ libnativewindow \ - libtextclassifier \ LOCAL_SHARED_LIBRARIES += \ libhwui \