#include "power.h"
#include "power-internal.h"
#include "display.h"
+#include "display-internal.h"
#include "common.h"
/**
_I("power_lock_e = %d", type);
+ if (!is_feature_display_supported() || !is_feature_display_state_supported()) {
+ if ((type == POWER_LOCK_DISPLAY) || (type == POWER_LOCK_DISPLAY_DIM))
+ return DEVICE_ERROR_NOT_SUPPORTED;
+ /*
+ * In case of POWER_LOCK_CPU for headless profile, temporary return DEVICE_ERROR_NONE.
+ * It will be implemented later.
+ */
+ else if (type == POWER_LOCK_CPU)
+ return DEVICE_ERROR_NONE;
+ }
+
if (check_async_call_rate(&num_calls) < 0) {
//LCOV_EXCL_START System Error
_E("Rejected by too frequent calls; %d (calls per sec.) limit is violated."
_I("power_lock_e = %d", type);
+ if (!is_feature_display_supported() || !is_feature_display_state_supported()) {
+ if ((type == POWER_LOCK_DISPLAY) || (type == POWER_LOCK_DISPLAY_DIM))
+ return DEVICE_ERROR_NOT_SUPPORTED;
+ /*
+ * In case of POWER_LOCK_CPU for headless profile, temporary return DEVICE_ERROR_NONE.
+ * It will be implemented later.
+ */
+ else if (type == POWER_LOCK_CPU)
+ return DEVICE_ERROR_NONE;
+ }
+
if (type == POWER_LOCK_CPU && power_locked_CPU) {
ret = unlock_state(DISPLAY_STATE_SCREEN_OFF, PM_SLEEP_MARGIN);
if (ret == 0) {