diff --git a/services/native/src/power_state_machine.cpp b/services/native/src/power_state_machine.cpp index db44b473f17bfcc8563ebb01aad01e8bebaa0cf0..e9f5c0164552fe0023f2e3be5d66f376c6363045 100644 --- a/services/native/src/power_state_machine.cpp +++ b/services/native/src/power_state_machine.cpp @@ -714,7 +714,11 @@ void PowerStateMachine::SendEventToPowerMgrNotify(PowerState state, int64_t call } if (state == PowerState::AWAKE) { notify->PublishScreenOnEvents(callTime); +#ifdef POWER_MANAGER_POWER_ENABLE_S4 + } else if (state == PowerState::INACTIVE || state == PowerState::HIBERNATE) { +#else } else if (state == PowerState::INACTIVE) { +#endif notify->PublishScreenOffEvents(callTime); } else { POWER_HILOGI(FEATURE_POWER_STATE, "No need to publish event, state:%{public}u", state);