Allow native statsd to link libsqlite
This is necessary because there are no ndk apis for sqlite and
security requirements for restricted statsd logging require
statsd to access the sqlite database. Statsd is a c++
process, so the java apis cannot be used for this.
Bug: 254279281
Test: m -j
Change-Id: Id6360b48274f30073f8fc323ff7fe0a072ced3e4
diff --git a/android/Android.bp b/android/Android.bp
index 8df66ca..f3ed07c 100644
--- a/android/Android.bp
+++ b/android/Android.bp
@@ -41,6 +41,12 @@
defaults: ["libsqlite3_android_defaults"],
vendor_available: true,
native_bridge_supported: true,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.os.statsd",
+ "test_com.android.os.statsd",
+ ],
+ min_sdk_version: "apex_inherit",
target: {
android: {
cflags: [
diff --git a/dist/Android.bp b/dist/Android.bp
index cfc9386..8df6f6a 100644
--- a/dist/Android.bp
+++ b/dist/Android.bp
@@ -111,6 +111,12 @@
srcs: ["sqlite3.c"],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.os.statsd",
+ "test_com.android.os.statsd",
+ ],
+
target: {
android: {
shared_libs: [
@@ -146,7 +152,7 @@
exclude_static_libs: ["libsqlite3_android"],
},
},
-
+ min_sdk_version: "apex_inherit",
export_include_dirs: ["."],
}