From: TaeminYeom Date: Fri, 30 Dec 2022 03:33:18 +0000 (+0900) Subject: [Device][Non-ACR]Check whether profile is TV X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fb0d9850108f0f9fa959646ddf45f5a8d785ae5;p=test%2Ftct%2Fcsharp%2Fapi.git [Device][Non-ACR]Check whether profile is TV display brightness is not supported on TV. It should be disabled on TV profile. Change-Id: I2ce07372afa26bac2060ef1b1229858253a1ca13 Signed-off-by: TaeminYeom --- diff --git a/tct-suite-vs/Tizen.Device.Tests/testcase/TSDisplay.cs b/tct-suite-vs/Tizen.Device.Tests/testcase/TSDisplay.cs index 64e295e..bc94cf9 100755 --- a/tct-suite-vs/Tizen.Device.Tests/testcase/TSDisplay.cs +++ b/tct-suite-vs/Tizen.Device.Tests/testcase/TSDisplay.cs @@ -17,6 +17,7 @@ namespace Tizen.System.Tests { bool ret_value; bool value; + string str_value; ret_value = Tizen.System.Information.TryGetValue("tizen.org/feature/display", out value); @@ -31,16 +32,22 @@ namespace Tizen.System.Tests isDisplayStateSupport = 1; } - try + ret_value = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out str_value); + if (ret_value && String.Compare(str_value, "tv", true) == 0) { - foreach (Display dis in Display.Displays) + isDisplayBrightnessSupport = 0; + } else { + try { - dis.Brightness = 30; + foreach (Display dis in Display.Displays) + { + dis.Brightness = 30; + } + } + catch (NotSupportedException e) + { + isDisplayBrightnessSupport = 0; } - } - catch (NotSupportedException e) - { - isDisplayBrightnessSupport = 0; } }