kunlun2: 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 d4a7573cd1
commit 7fd6e62ecd

View file

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