From 4bc09ae4361b6fc1f1a5044ea102e3fe6f3ce540 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Fri, 18 Jan 2013 17:00:54 +0000 Subject: Improve ORS sideload to display GUI with cancel button --- gui/action.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gui/action.cpp') diff --git a/gui/action.cpp b/gui/action.cpp index 1f3647d16..14ef71609 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -253,9 +253,8 @@ int GUIAction::doActions() LOGE("Error setting pthread_attr_setstacksize\n"); return -1; } - LOGI("creating thread\n"); + LOGI("Creating thread\n"); int ret = pthread_create(&t, &tattr, thread_start, this); - LOGI("after thread creation\n"); if (ret) { LOGE("Unable to create more threads for actions... continuing in same thread! %i\n", ret); thread_start(this); @@ -1071,6 +1070,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) string result, Sideload_File; if (!PartitionManager.Mount_Current_Storage(true)) { + DataManager::SetValue("tw_page_done", "1"); // For OpenRecoveryScript support operation_end(1, simulate); return 0; } @@ -1101,6 +1101,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) } } } + DataManager::SetValue("tw_page_done", "1"); // For OpenRecoveryScript support operation_end(ret, simulate); return 0; } @@ -1113,6 +1114,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) DataManager::GetValue("tw_child_pid", child_pid); ui_print("Cancelling ADB sideload...\n"); kill(child_pid, SIGTERM); + DataManager::SetValue("tw_page_done", "1"); // For OpenRecoveryScript support return 0; } } -- cgit v1.2.3