sdm710-common: power-libperfmgr: enable DOUBLE_TAP_TO_WAKE mode explicitly

* libperfmgr expects mode to be declared in powerhint but dt2w is handled in powerhal
* so let's just force enable it like google did with LOW_POWER
* also use break instead of fallthrough because there's no need to play with hints

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
This commit is contained in:
Volodymyr Zhdanov 2020-10-01 02:24:54 +03:00 committed by giasen
parent 623f59e656
commit 069088dff8

View file

@ -155,8 +155,8 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
ndk::ScopedAStatus Power::isModeSupported(Mode type, bool *_aidl_return) { ndk::ScopedAStatus Power::isModeSupported(Mode type, bool *_aidl_return) {
bool supported = HintManager::GetInstance()->IsHintSupported(toString(type)); bool supported = HintManager::GetInstance()->IsHintSupported(toString(type));
// LOW_POWER handled insides PowerHAL specifically // LOW_POWER and DOUBLE_TAP_TO_WAKE handled insides PowerHAL specifically
if (type == Mode::LOW_POWER) { if (type == Mode::LOW_POWER || type == Mode::DOUBLE_TAP_TO_WAKE) {
supported = true; supported = true;
} }
LOG(INFO) << "Power mode " << toString(type) << " isModeSupported: " << supported; LOG(INFO) << "Power mode " << toString(type) << " isModeSupported: " << supported;