[DO NOT MERGE] cs40l26: single HAL for dual haptics

We need to sync both haptics on the single HAL
architecture to reduce the time overhead and prevent the
mismatch behavior from vibrator manager HAL implementation.

Bug: 260090235
Bug: 261687849
Bug: 261841035
Bug: 261832151
Test: atest PtsVibratorHalTestSuite \
PtsHapticsTestCases \
PtsHapticsFeatureTestCases \
VibratorHalCs40l26TestSuite \
VtsHalVibratorManagerTargetTest \
VtsHalVibratorTargetTest \
android.os.cts.VibratorTest \
android.os.cts.VibratorManagerTest \
android.os.cts.VibrationEffectTest \
android.os.cts.VibrationAttributesTest \
android.os.cts.CombinedVibrationTest \
Change-Id: I084e1da952ab2f63e5c217a7f708ac3d34635336
Signed-off-by: Chase Wu <chasewu@google.com>
This commit is contained in:
Chase Wu 2022-11-29 16:39:31 +08:00
parent aa946e4dcb
commit 07468b074a
25 changed files with 542 additions and 884 deletions

View file

@ -71,7 +71,7 @@ void HwApiBase::debug(int fd) {
HwCalBase::HwCalBase() {
std::ifstream calfile;
std::ifstream calfile_other;
std::ifstream calfile_dual;
auto propertyPrefix = std::getenv("PROPERTY_PREFIX");
if (propertyPrefix != NULL) {
@ -93,16 +93,16 @@ HwCalBase::HwCalBase() {
}
}
utils::fileFromEnv("CALIBRATION_FILEPATH_OTHER", &calfile_other);
utils::fileFromEnv("CALIBRATION_FILEPATH_DUAL", &calfile_dual);
for (std::string line; std::getline(calfile_other, line);) {
for (std::string line; std::getline(calfile_dual, line);) {
if (line.empty() || line[0] == '#') {
continue;
}
std::istringstream is_line(line);
std::string key, value;
if (std::getline(is_line, key, ':') && std::getline(is_line, value)) {
key = utils::trim(key) + "_other";
key = utils::trim(key) + "_dual";
mCalData[key] = utils::trim(value);
}
}