RM6785: Build dummy libmtkperf_client library
* Required for some vendor blobs that have dependencies on this library.
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I0648f2964e7a8313871085065a1f15b090cda011
diff --git a/libmtkperf_client/Android.bp b/libmtkperf_client/Android.bp
new file mode 100644
index 0000000..86bfcb5
--- /dev/null
+++ b/libmtkperf_client/Android.bp
@@ -0,0 +1,22 @@
+//
+// Copyright (C) 2022 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+
+cc_defaults {
+ name: "libmtkperf_client_defaults",
+ srcs: ["client.c"],
+ shared_libs: ["liblog"],
+}
+
+cc_library_shared {
+ name: "libmtkperf_client_vendor",
+ vendor: true,
+ defaults: ["libmtkperf_client_defaults"],
+}
+
+cc_library_shared {
+ name: "libmtkperf_client",
+ defaults: ["libmtkperf_client_defaults"],
+}
diff --git a/libmtkperf_client/client.c b/libmtkperf_client/client.c
new file mode 100644
index 0000000..8bf820a
--- /dev/null
+++ b/libmtkperf_client/client.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2022 The LineageOS Project
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define LOG_TAG "libmtkperf_client"
+
+#include <log/log.h>
+
+int perf_lock_acq(int hdl, int dur, long num, unsigned int tid) {
+ ALOGI("[%s] hdl: %d, dur: %d, num: %ld, tid: %u",
+ __func__, hdl, dur, num, tid);
+ if (hdl > 0)
+ return hdl;
+
+ return 233;
+}
+
+int perf_lock_rel(int hdl) {
+ ALOGI("[%s] hdl: %d", __func__, hdl);
+ return 0;
+}
+
+int perf_cus_lock_hint(int hint, int dur) {
+ ALOGI("[%s], hint: %d, dur: %d", __func__, hint, dur);
+ return 233;
+}