[System.Feedback] Add privilege description to internal API for multi-theme
authorYunhee Seo <yuni.seo@samsung.com>
Mon, 21 Aug 2023 11:10:16 +0000 (20:10 +0900)
committerChanwoo Choi <chanwoo@kernel.org>
Wed, 23 Aug 2023 07:20:40 +0000 (16:20 +0900)
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 <yuni.seo@samsung.com>
src/Tizen.System.Feedback/Feedback/Feedback.cs

index 73ee4a5..c9b2531 100755 (executable)
@@ -424,12 +424,14 @@ namespace Tizen.System
         /// </summary>
         /// <remarks>
         /// 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.
         /// </remarks>
         /// <since_tizen> 10 </since_tizen>
         /// <param name="type">The feedback type.</param>
         /// <param name="indexOfTheme">The index of theme will be set.</param>
         /// <exception cref="ArgumentException">Thrown when failed because of an invalid arguament.</exception>
         /// <exception cref="NotSupportedException">Thrown when failed becuase the device (haptic, sound) is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when failed because the access is not granted(No privilege)</exception>
         /// <exception cref="InvalidOperationException">Thrown when failed because of a system error.</exception>
         /// <example>
         /// <code>
@@ -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");