Fix to move to the previous page when pressing back key 32/268332/1 accepted/tizen_6.5_unified accepted/tizen/6.5/unified/20211221.135207 submit/tizen_6.5/20211220.122505
authorSeechan Kim <cbible.kim@samsung.com>
Mon, 20 Dec 2021 10:35:23 +0000 (19:35 +0900)
committerKamaljeet Chauhan <kamal.jc@samsung.com>
Mon, 20 Dec 2021 12:12:16 +0000 (12:12 +0000)
Change-Id: Ie1a275ee7c12f40d9cbbf77ef17934db929c137a

packaging/oauth2.spec
src/oauth2_manager.c

index 4245941..62385d5 100644 (file)
@@ -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
index c7cc339..04c3a2b 100755 (executable)
@@ -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);
+               }
        }
 }