Fix app_control_reply_to_launch_request API 88/171588/5
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 9 Aug 2017 07:39:52 +0000 (16:39 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 6 Mar 2018 06:00:13 +0000 (15:00 +0900)
If the aul_svc_create_result_bundle API returns AUL_SVC_RET_ECANCELED,
the API returns APP_CONTROL_ERROR_NONE value.
This patch is for backward compatibility.

Change-Id: I304c73b7a00d886029148d42d10a4c8419bbe752
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app_control.c

index 55eda2747550e3e6ebc6a52ab1b591a47f70e433..1badb0b0318cf57004cd79190aed1f0b220f3046 100644 (file)
@@ -864,8 +864,13 @@ int app_control_reply_to_launch_request(app_control_h reply, app_control_h reque
        if (result == APP_CONTROL_RESULT_APP_STARTED)
                return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, "APP_CONTROL_RESULT_APP_STARTED is not allowed to use");
 
-       if (aul_svc_create_result_bundle(request->data, &reply_data) != 0)
+       ret = aul_svc_create_result_bundle(request->data, &reply_data);
+       if (ret != 0) {
+               if (ret == AUL_SVC_RET_ECANCELED)
+                       return APP_CONTROL_ERROR_NONE;
+
                return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to create a result bundle");
+       }
 
        app_control_foreach_extra_data(reply, app_control_copy_reply_data_cb, reply_data);