diff --git a/libqti-perfd-client/.clang-format b/libqti-perfd-client/.clang-format new file mode 120000 index 0000000..0457b53 --- /dev/null +++ b/libqti-perfd-client/.clang-format @@ -0,0 +1 @@ +../../../../build/soong/scripts/system-clang-format \ No newline at end of file diff --git a/libqti-perfd-client/Android.bp b/libqti-perfd-client/Android.bp new file mode 100644 index 0000000..9b445d6 --- /dev/null +++ b/libqti-perfd-client/Android.bp @@ -0,0 +1,18 @@ +// +// Copyright (C) 2021-2024 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +soong_namespace { +} + +cc_library_shared { + name: "libqti-perfd-client", + srcs: ["client.c"], + shared_libs: [ + "liblog", + "libutils", + ], + vendor: true, +} diff --git a/libqti-perfd-client/client.c b/libqti-perfd-client/client.c new file mode 100644 index 0000000..547ebcd --- /dev/null +++ b/libqti-perfd-client/client.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2021-2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#define LOG_TAG "libqti-perfd-client" + +#include +#include + +void perf_get_feedback() {} + +void perf_hint() {} + +int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { + ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", handle, duration, + arg3[0], arg4); + return handle ?: 233; +} + +void perf_lock_cmd() {} + +int perf_lock_rel(int handle) { + ALOGI("perf_lock_rel: handle: %d", handle); + return handle ?: 233; +} + +void perf_lock_use_profile() {}