From 2724d61255fc121c3eb86e778237429d42d9d79e Mon Sep 17 00:00:00 2001 From: Chase Wu Date: Tue, 17 Jan 2023 20:14:47 +0800 Subject: [PATCH 1/2] [DO NOT MERGE] vibrator/cs40l26: Fix unsupport primitive effects test Bug: 264219822 Test: atest Vibrator/VibratorAidl#ComposeUnsupportedPrimitives/TOP_LEVEL_VIBRATOR_0 Change-Id: I736e509bcd1e8004c144744e06c63cc35b6fbfb2 --- vibrator/cs40l26/Vibrator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 0b26730..131a376 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -765,16 +765,15 @@ ndk::ScopedAStatus Vibrator::compose(const std::vector &composi return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } - if(effectScale < mPrimitiveMinScale[static_cast(e_curr.primitive)]) { - effectScale = mPrimitiveMinScale[static_cast(e_curr.primitive)]; - } - if (e_curr.primitive != CompositePrimitive::NOOP) { ndk::ScopedAStatus status; status = getPrimitiveDetails(e_curr.primitive, &effectIndex); if (!status.isOk()) { return status; } + if (effectScale < mPrimitiveMinScale[static_cast(e_curr.primitive)]) { + effectScale = mPrimitiveMinScale[static_cast(e_curr.primitive)]; + } effectVolLevel = intensityToVolLevel(effectScale, effectIndex); totalDuration += mEffectDurations[effectIndex]; } From 6eedadb40c4f595c99724fe8aaf5ab9743ba2054 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Tue, 31 Jan 2023 16:47:50 +0800 Subject: [PATCH 2/2] [DO NOT MERGE] thermal: correct the hyst value for VIRTUAL-SKIN-CHARGE Bug: 265915107 Test: emul_temp in off charging mode and check the throttling works properly Change-Id: I594359ebae347a36454f7cf2c1101494ac3c1484 --- thermal_info_config_charge_felix.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thermal_info_config_charge_felix.json b/thermal_info_config_charge_felix.json index ed4aeea..870dbc7 100644 --- a/thermal_info_config_charge_felix.json +++ b/thermal_info_config_charge_felix.json @@ -251,7 +251,7 @@ "Combination":["VIRTUAL-SKIN-CLOSE", "VIRTUAL-SKIN-OPEN"], "Coefficient":[1.0, 1.0], "HotThreshold":["NAN", 25.0, 41.0, 43.0, 45.0, 46.5, 54.0], - "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.4, 1.9], "Multiplier":0.001, "PollingDelay":60000, "PassiveDelay":60000,