Merge 69959ecc9b on remote branch

Change-Id: Id8272dc07f0db7b373568a6952eb6e2107f49c6d
This commit is contained in:
Linux Build Service Account
2020-10-08 05:33:29 -07:00

View File

@@ -62,7 +62,6 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
switch(type){
case Mode::DOUBLE_TAP_TO_WAKE:
case Mode::LOW_POWER:
case Mode::FIXED_PERFORMANCE:
case Mode::LAUNCH:
case Mode::EXPENSIVE_RENDERING:
case Mode::DEVICE_IDLE:
@@ -80,15 +79,29 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
power_hint(POWER_HINT_INTERACTION, NULL);
break;
case Mode::SUSTAINED_PERFORMANCE:
case Mode::FIXED_PERFORMANCE:
power_hint(POWER_HINT_SUSTAINED_PERFORMANCE, NULL);
break;
default:
LOG(INFO) << "Mode " << static_cast<int32_t>(type) << "Not Supported";
break;
}
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Power::isModeSupported(Mode type, bool* _aidl_return) {
LOG(INFO) << "Power isModeSupported: " << static_cast<int32_t>(type);
*_aidl_return = false;
switch(type){
case Mode::INTERACTIVE:
case Mode::SUSTAINED_PERFORMANCE:
case Mode::FIXED_PERFORMANCE:
*_aidl_return = true;
break;
default:
*_aidl_return = false;
break;
}
return ndk::ScopedAStatus::ok();
}