From: lokilee73 Date: Wed, 24 Feb 2021 08:16:51 +0000 (+0900) Subject: [CTC][Platform-permission][NonACR][6.5 Apply display feature for iot profile] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bee0d8c1261d84f85c6131d30e9e020009f068ad;p=test%2Ftct%2Fnative%2Fapi.git [CTC][Platform-permission][NonACR][6.5 Apply display feature for iot profile] Change-Id: I05b167b56090924fa3d8160ea853153ed9931353 Signed-off-by: lokilee73 --- diff --git a/src/ctc/platform-permission/CTs-platform-permission-device.c b/src/ctc/platform-permission/CTs-platform-permission-device.c old mode 100755 new mode 100644 index 8e8e6354d..28e170e0d --- a/src/ctc/platform-permission/CTs-platform-permission-device.c +++ b/src/ctc/platform-permission/CTs-platform-permission-device.c @@ -10,6 +10,7 @@ #define LED_FEATURE "http://tizen.org/feature/led" #define IR_FEATURE "http://tizen.org/feature/consumer_ir" #define BATTERY_FEATURE "http://tizen.org/feature/battery" +#define DISPLAY_FEATURE_MAIN "http://tizen.org/feature/display" #define DISPLAY_STATE_FEATURE "http://tizen.org/feature/display.state" /** @@ -425,10 +426,22 @@ int CTc_Device_PrivilegeLed_play_stop(void) int CTc_Device_PrivilegePower_request_release(void) { START_TEST; + static bool bIsDisplayFeatureSupported; + static bool bIsDisplayStateFeatureSupported; + + IS_FEATURE_SUPPORTED(DISPLAY_FEATURE_MAIN, bIsDisplayFeatureSupported, API_NAMESPACE); + IS_FEATURE_SUPPORTED(DISPLAY_STATE_FEATURE, bIsDisplayStateFeatureSupported, API_NAMESPACE); + + if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false)) + { + FPRINTF("[Line : %d][%s] Feature is not supported\\n", __LINE__, API_NAMESPACE); + return 0; + } + int nRet = device_power_request_lock(POWER_LOCK_DISPLAY, 10); if(nRet == DEVICE_ERROR_NONE) - device_power_release_lock(POWER_LOCK_DISPLAY); - PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, nRet, "device_haptic_get_count", DeviceGetError(nRet)); + device_power_release_lock(POWER_LOCK_DISPLAY); + PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, nRet, "device_power_release_lock", DeviceGetError(nRet)); return 0; }