Fix the updatePeriod 33/226533/1 accepted/tizen/unified/20200312.234324 submit/tizen/20200305.005431 submit/tizen/20200310.043132 submit/tizen/20200311.074319
authorSunghyun Kim <scholb.kim@samsung.com>
Tue, 3 Mar 2020 10:57:07 +0000 (19:57 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Tue, 3 Mar 2020 10:57:07 +0000 (19:57 +0900)
The existing updatePeriod does not work properly
Therefore, when the value is set, it is modified to operate correctly.

Change-Id: I5a7de8df136176063c11af2fad616cb092a8770e

widget_viewer_dali/internal/widget_view/widget_view_impl.cpp

index 347b386a720e44fcde6e97eda18123b122e84099..2a39632201f03796f3e57635c33e07e5600b2782 100644 (file)
@@ -926,6 +926,23 @@ void WidgetView::OnInitialize()
 
   mInstanceId = instanceId;
 
+  // Set UpdatePeriod
+  if( mUpdatePeriod > 0.0f)
+  {
+    widget_instance_h instance = widget_instance_get_instance( mWidgetId.c_str(), mInstanceId.c_str() );
+    if( !instance )
+    {
+      DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() );
+      return;
+    }
+    ret = widget_instance_set_period( instance, mUpdatePeriod );
+    if( ret < 0 )
+    {
+      DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_set_period is failed [%s].\n", mWidgetId.c_str() );
+      return;
+    }
+  }
+
   // Preview image
   widget_service_get_size_type( mWidth, mHeight, &sizeType );