recovery: Fix sideload cancel
* Always launch adb as a child process, not a thread. This allows us to cancel with SIGTERM when the host does not initiate sideload. * Always kill adb from the sideload thread, where it was launched. * Remove the magic exit file in the FUSE sideload code in favor of a signal handler. * Use a timer to wait for the fuse sideload file instead of a counted number of sleep calls. This ensures a consistent wait time when the process receives signals. * Allow ENOTCONN for sideload file, in case a previous adb instance was terminated without properly cleaning up. * Provide sideload cancellation in adb_copy_file(). Note the whole adb_copy_file mechanism is is ugly but it will be replaced with a block cache in fuse_sideload.c. * Allow cancel of sideload thread from the UI thread via member sideload_data.cancel. * Fix semantics for stop_sideload and wait_sideload. stop_sideload sets the cancel flag for the sideload thread. * install_package starts the progress thread, it cannot be used to cancel the UI wait. Change-Id: Ibf63a6b57fe1be52227974d811f302f1b5860c06
Loading
Please register or sign in to comment