diff options
author | Myungki Lee <mk5004.lee@samsung.com> | 2017-05-19 10:34:07 +0900 |
---|---|---|
committer | Son seungha <seungha.son@samsung.com> | 2017-05-23 02:41:02 +0000 |
commit | 1968080e64415edfbb1b1d2245ab39dc2f98c3ff (patch) | |
tree | 6f72ee7d75b71f6c8babb4a3d827132603ccab0a | |
parent | dd71225ad2dc08565188e6184d203006c19a5aac (diff) | |
download | application-1968080e64415edfbb1b1d2245ab39dc2f98c3ff.tar.gz application-1968080e64415edfbb1b1d2245ab39dc2f98c3ff.tar.bz2 application-1968080e64415edfbb1b1d2245ab39dc2f98c3ff.zip |
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 <seungha.son@samsung.com>
Change-Id: Ia8fc6cb1d370cf5de9067a8fe5eb037e63a76182
2 files changed, 8 insertions, 3 deletions
diff --git a/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs b/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs index adc0ab4..6afd5c5 100755 --- a/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationProgressBinder.cs +++ b/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/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs b/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs index 2eca359..8611503 100755 --- a/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationProgressArgsBinder.cs +++ b/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 +} |