From: Yunhee Seo Date: Mon, 21 Aug 2023 11:10:16 +0000 (+0900) Subject: [System.Feedback] Add privilege description to internal API for multi-theme X-Git-Tag: submit/tizen/20230823.151046~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e51f538a9cfe5161ac0b5967f94fef24ff1b7f37;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [System.Feedback] Add privilege description to internal API for multi-theme To call below feedback internal API, App should have accurate privilege. Description and privilege type is added to below API. - public void SetThemeIndexInternal(FeedbackType type, uint indexOfTheme) Signed-off-by: Yunhee Seo --- diff --git a/src/Tizen.System.Feedback/Feedback/Feedback.cs b/src/Tizen.System.Feedback/Feedback/Feedback.cs index 73ee4a510..c9b253103 100755 --- a/src/Tizen.System.Feedback/Feedback/Feedback.cs +++ b/src/Tizen.System.Feedback/Feedback/Feedback.cs @@ -424,12 +424,14 @@ namespace Tizen.System /// /// /// Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. + /// To set the index of theme for Sound type, the application should have http://tizen.org/privilege/systemsettings.admin privilege. /// /// 10 /// The feedback type. /// The index of theme will be set. /// Thrown when failed because of an invalid arguament. /// Thrown when failed becuase the device (haptic, sound) is not supported. + /// Thrown when failed because the access is not granted(No privilege) /// Thrown when failed because of a system error. /// /// @@ -454,6 +456,8 @@ namespace Tizen.System throw new ArgumentException("Invalid Arguments"); case Interop.Feedback.FeedbackError.NotSupported: throw new NotSupportedException("Device is not supported"); + case Interop.Feedback.FeedbackError.PermissionDenied: + throw new UnauthorizedAccessException("Access is not granted"); case Interop.Feedback.FeedbackError.OperationFailed: default: throw new InvalidOperationException("Failed to set index of theme internal");