added feature not supported exception in account-provider (#771)
authorabhishekvijay <40332812+abhishekvijay@users.noreply.github.com>
Fri, 29 Mar 2019 06:04:44 +0000 (11:34 +0530)
committerWonYoung Choi <wy80.choi@samsung.com>
Fri, 29 Mar 2019 06:04:44 +0000 (15:04 +0900)
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs

index a580322..38e5f64 100644 (file)
@@ -227,6 +227,7 @@ namespace Tizen.Account.AccountManager
         /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
         public static Dictionary<string, string> GetLabelsByAppId(string appId)
         {
+            AccountErrorFactory.CheckAccountFeature();
 
             Dictionary<string, string> labels = new Dictionary<string, string>();
             Interop.AccountProvider.LabelCallback callback = (string applicationId, string label, string locale, IntPtr userData) =>
@@ -320,6 +321,8 @@ namespace Tizen.Account.AccountManager
         /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
         public static bool IsFeatureSupportedByApp(string appId, string capability)
         {
+            AccountErrorFactory.CheckAccountFeature();
+
             bool supported = Interop.AccountProvider.IsFeatureSupported(appId, capability);
             if (!supported)
             {
@@ -348,6 +351,7 @@ namespace Tizen.Account.AccountManager
         /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
         public static IEnumerable<string> GetFeaturesByAppId(string appId)
         {
+            AccountErrorFactory.CheckAccountFeature();
 
             List<string> features = new List<string>();
             Interop.AccountProvider.AccountProviderFeatureCallback callback = (string applicationId, string key, IntPtr userData) =>