power: Add supported modes

Added supported modes in impl

Change-Id: I57a5df42e813f1b6af59f9edf37e47fdac400dee
This commit is contained in:
Rajeswari N
2020-07-22 11:01:52 +05:30
parent 642b1de850
commit 72bc80ff55

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);
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();
}