From 9d047fb117ee4fc8161d0a959c38ef945844b81e Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Mon, 14 Feb 2022 14:43:32 +0000 Subject: [PATCH] Stub functions not present on android Q --- tools/qtimapper-shim/ext/mapper.h | 2 -- tools/qtimapper-shim/shim.cpp | 13 ++++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/qtimapper-shim/ext/mapper.h b/tools/qtimapper-shim/ext/mapper.h index c7bbf08..5dae23c 100644 --- a/tools/qtimapper-shim/ext/mapper.h +++ b/tools/qtimapper-shim/ext/mapper.h @@ -99,7 +99,6 @@ struct IQtiMapper : public IBase { }; } // namespace V3_0 -#ifdef SHIM_MODE namespace V2_0 { struct IQtiMapper : public IBase { @@ -183,5 +182,4 @@ struct IQtiMapper : public IBase { }; } // namespace V2_0 -#endif } // namespace vendor::qti::hardware::display::mapper diff --git a/tools/qtimapper-shim/shim.cpp b/tools/qtimapper-shim/shim.cpp index d9dc943..300e643 100644 --- a/tools/qtimapper-shim/shim.cpp +++ b/tools/qtimapper-shim/shim.cpp @@ -36,9 +36,6 @@ #include #include #include - -#define SHIM_MODE 1 - #include "ext/common.h" #include "ext/gr_utils.h" #include "ext/mapper.h" @@ -47,6 +44,16 @@ using namespace android::hardware; using namespace android; +// These two functions are used by the blob and aren't present on Q so weakly stub them +extern "C" uint64_t __attribute__((weak)) atrace_get_enabled_tags() { + return 0; +} + + +namespace android::hardware::details { + void __attribute__((weak)) return_status::onValueRetrieval() const {} +} + bool IBase::isRemote() const { return false; }