@ -171,10 +171,20 @@ 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 = mHintManager - > IsHintSupported ( toString ( type ) ) ;
bool supported = mHintManager - > IsHintSupported ( toString ( type ) ) ;
// LOW_POWER handled insides PowerHAL specifically
switch ( type ) {
if ( type = = Mode : : LOW_POWER ) {
case Mode : : LOW_POWER : // LOW_POWER handled insides PowerHAL specifically
supported = true ;
supported = true ;
break ;
case Mode : : DOUBLE_TAP_TO_WAKE :
supported = true ;
break ;
case Mode : : INTERACTIVE :
supported = true ;
break ;
default :
break ;
}
}
LOG ( INFO ) < < " Power mode " < < toString ( type ) < < " isModeSupported: " < < supported ;
LOG ( INFO ) < < " Power mode " < < toString ( type ) < < " isModeSupported: " < < supported ;
* _aidl_return = supported ;
* _aidl_return = supported ;
return ndk : : ScopedAStatus : : ok ( ) ;
return ndk : : ScopedAStatus : : ok ( ) ;