From: Changgyu Choi Date: Fri, 31 Jul 2020 01:50:11 +0000 (+0900) Subject: Remove unnecessary condition check X-Git-Tag: submit/tizen/20200731.022814~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fapi%2Fapp-manager.git;a=commitdiff_plain;h=a1039d3656d378ed3f03d5a550bc3fad3787313d Remove unnecessary condition check Change-Id: I195b3b138914fce82a4b4836bb71b97f2e85f083 Signed-off-by: Changgyu Choi --- diff --git a/src/app_manager.c b/src/app_manager.c index cd0cd25..a02d747 100644 --- a/src/app_manager.c +++ b/src/app_manager.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 - 2016 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2011 - 2020 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -15,16 +15,16 @@ */ +#include #include #include #include #include -#include #include #include -#include #include +#include #include #include "app_manager.h" @@ -145,9 +145,6 @@ API int app_manager_resume_app(app_context_h app_context) char *instance_id = NULL; int retval = APP_MANAGER_ERROR_NONE; - if (app_context == NULL) - return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); - if (app_context_get_app_id(app_context, &app_id) != APP_MANAGER_ERROR_NONE) return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to get the application ID"); @@ -227,9 +224,6 @@ API int app_manager_terminate_app(app_context_h app_context) int retval; pid_t pid = 0; - if (app_context == NULL) - return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); - if (app_context_get_pid(app_context, &pid) != APP_MANAGER_ERROR_NONE) return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to get the process ID"); @@ -252,9 +246,6 @@ API int app_manager_request_terminate_bg_app(app_context_h app_context) int retval = APP_MANAGER_ERROR_NONE; pid_t pid = 0; - if (app_context == NULL) - return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); - if (app_context_get_pid(app_context, &pid) != APP_MANAGER_ERROR_NONE) return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to get the process ID"); @@ -663,9 +654,6 @@ API int app_manager_attach_window(const char *parent_app_id, const char *child_a { int ret; - if (parent_app_id == NULL || child_app_id == NULL) - return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); - ret = aul_window_attach(parent_app_id, child_app_id); if (ret != AUL_R_OK) return app_manager_error(__aul_error_convert(ret), __FUNCTION__, NULL); @@ -677,9 +665,6 @@ API int app_manager_detach_window(const char *app_id) { int ret; - if (app_id == NULL) - return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); - ret = aul_window_detach(app_id); if (ret != AUL_R_OK) return app_manager_error(__aul_error_convert(ret), __FUNCTION__, NULL);