Do not reset the size type even if the FB is not created.
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 8 May 2015 07:43:24 +0000 (16:43 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 8 May 2015 07:43:24 +0000 (16:43 +0900)
Caller should know the current size type of widget anytime.

[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I07bc0266c154f8f577b34afa1c76811e840afdc9

widget_viewer/src/widget.c

index 875f55b..01828b4 100644 (file)
@@ -2676,9 +2676,7 @@ EAPI int widget_viewer_get_size_type(widget_h handle, widget_size_type_e *size_t
        case WIDGET_TYPE_BUFFER:
        case WIDGET_TYPE_SCRIPT:
                if (!fb_is_created(handle->common->widget.fb)) {
-                       w = 0;
-                       h = 0;
-                       ret = WIDGET_ERROR_NOT_EXIST;
+                       DbgPrint("FB is not created yet, but give its size to the caller: %dx%d\n", w, h);
                }
                break;
        default:
@@ -2692,8 +2690,9 @@ EAPI int widget_viewer_get_size_type(widget_h handle, widget_size_type_e *size_t
 
 out:
 
-       if (size_type)
+       if (size_type) {
                *size_type = result_size_type;
+       }
 
        return ret;
 }