From: Seechan Kim Date: Mon, 20 Dec 2021 10:35:23 +0000 (+0900) Subject: Fix to move to the previous page when pressing back key X-Git-Tag: submit/tizen_6.0/20211220.122416^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_6.0_unified;p=platform%2Fcore%2Faccount%2Fliboauth2.git Fix to move to the previous page when pressing back key Change-Id: Ie1a275ee7c12f40d9cbbf77ef17934db929c137a --- diff --git a/packaging/oauth2.spec b/packaging/oauth2.spec index 4245941..62385d5 100644 --- a/packaging/oauth2.spec +++ b/packaging/oauth2.spec @@ -1,6 +1,6 @@ Name: oauth2 Summary: Tizen oauth 2.0 Framework -Version: 0.0.6 +Version: 0.0.7 Release: 1 Group: Social & Content/API License: Apache-2.0 diff --git a/src/oauth2_manager.c b/src/oauth2_manager.c index 9a50214..1494d6a 100755 --- a/src/oauth2_manager.c +++ b/src/oauth2_manager.c @@ -287,6 +287,12 @@ __handle_back_key(void *data, Evas_Object *p, void *info) { if (data) { oauth2_manager_s *mgr_handle = (oauth2_manager_s *)data; + + if (ewk_view_back_possible(mgr_handle->ewk_view)) { + OAUTH2_LOG_I("on_web_url_page_back"); + ewk_view_back(mgr_handle->ewk_view); + return; + } __convert_tizen_error_to_oauth_error( OAUTH2_ERROR_USER_CANCELLED, "User cancelled the operation", @@ -431,8 +437,11 @@ __exit_back_cb(void *data, Evas_Object *p, void *info) { if (data) { oauth2_manager_s *mgr_handle = (oauth2_manager_s *)data; - evas_object_hide(mgr_handle->ewk_view); - evas_object_hide(mgr_handle->login_win); + OAUTH2_LOG_I("__exit_back_cb is_active=%d", mgr_handle->is_active); + if (mgr_handle->is_active == FALSE) { + evas_object_hide(mgr_handle->ewk_view); + evas_object_hide(mgr_handle->login_win); + } } }