Felix HAL: Added RECORD_COMPOSE macro for composite effects.
Added the composite vector effects to HAL dumpsys instead of the size. Bug: 376330571 Flag: EXEMPT log only update Test: Flash to device and verified dumpsys Test: atest VibratorHalCs40l26TestSuitePrivate Change-Id: I59efffdbe78bc865ca60a30d8c6a9bdc855def6b Signed-off-by: Zouberou Sayibou <zouberou@google.com>
This commit is contained in:
parent
e0def5d0df
commit
b8b980862d
1 changed files with 11 additions and 1 deletions
|
@ -53,6 +53,16 @@ namespace vibrator {
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RECORD_COMPOSE(...) \
|
||||||
|
std::string effectString = ""; \
|
||||||
|
for (auto &effect : composite) { \
|
||||||
|
effectString += effect.toString() + ", "; \
|
||||||
|
} \
|
||||||
|
this->mHwApiDef->recordEvent(__func__, effectString.c_str()); \
|
||||||
|
if (this->mIsDual) { \
|
||||||
|
this->mHwApiDual->recordEvent(__func__, effectString.c_str()); \
|
||||||
|
} \
|
||||||
|
|
||||||
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_COMP = 2044; // (COMPOSE_SIZE_MAX + 1) * 8 + 4
|
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_COMP = 2044; // (COMPOSE_SIZE_MAX + 1) * 8 + 4
|
||||||
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_PWLE = 2302;
|
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_PWLE = 2302;
|
||||||
|
|
||||||
|
@ -977,7 +987,7 @@ ndk::ScopedAStatus Vibrator::compose(const std::vector<CompositeEffect> &composi
|
||||||
const std::shared_ptr<IVibratorCallback> &callback) {
|
const std::shared_ptr<IVibratorCallback> &callback) {
|
||||||
ATRACE_NAME("Vibrator::compose");
|
ATRACE_NAME("Vibrator::compose");
|
||||||
ALOGD("Vibrator::compose");
|
ALOGD("Vibrator::compose");
|
||||||
RECORD("composite.size = %zu", composite.size());
|
RECORD_COMPOSE(composite);
|
||||||
|
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
uint16_t nextEffectDelay;
|
uint16_t nextEffectDelay;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue