From 8a72fbd5da8463d6ddb738e693bf9e5f3c7c41b9 Mon Sep 17 00:00:00 2001 From: Myungki Lee Date: Fri, 19 May 2017 10:34:07 +0900 Subject: [PATCH] Fix wrong input parameter ProgressCategory.PendingBar is same to Percent in native capi. There is no pendingbar in capi enum value, binding the pendingbar to native api is an error Signed-off-by: Seungha Son Change-Id: Ia8fc6cb1d370cf5de9067a8fe5eb037e63a76182 --- .../Tizen.Applications.Notifications/NotificationProgressBinder.cs | 6 ++++-- .../NotificationProgressArgsBinder.cs | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs index adc0ab4..6afd5c5 100755 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs @@ -23,20 +23,22 @@ namespace Tizen.Applications.Notifications double current, max; Notification.ProgressType progress = notification.Progress; - Interop.Notification.SetProgressType(notification.Handle, progress.Category); if (progress.Category == ProgressCategory.PendingBar) { + Interop.Notification.SetProgressType(notification.Handle, ProgressCategory.Percent); current = 0; max = 0; } else if (progress.Category == ProgressCategory.Percent) { + Interop.Notification.SetProgressType(notification.Handle, progress.Category); current = progress.ProgressCurrent / 100; max = progress.ProgressMax; } else { + Interop.Notification.SetProgressType(notification.Handle, progress.Category); current = progress.ProgressCurrent; max = progress.ProgressMax; } @@ -70,4 +72,4 @@ namespace Tizen.Applications.Notifications } } } -} \ No newline at end of file +} diff --git a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs index 2eca359..8611503 100755 --- a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs +++ b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs @@ -35,6 +35,9 @@ namespace Tizen.Applications.NotificationEventListener if (category == ProgressCategory.Percent) { current *= 100; + + if (current == 0 && max == 0) + category = ProgressCategory.PendingBar; } eventargs.Progress = new NotificationEventArgs.ProgressArgs(); @@ -44,4 +47,4 @@ namespace Tizen.Applications.NotificationEventListener } } } -} \ No newline at end of file +} -- 2.7.4