trivial: Ensure the daemon sends IDLE when firmware is updated

This commit is contained in:
Richard Hughes 2018-09-10 15:49:59 +01:00
parent 2da1aca6e3
commit 7772dcfc91
4 changed files with 2 additions and 12 deletions

View File

@ -331,7 +331,6 @@ fu_csr_device_upload (FuDevice *device, GError **error)
} }
/* notify UI */ /* notify UI */
fu_device_set_status (device, FWUPD_STATUS_IDLE);
return dfu_utils_bytes_join_array (chunks); return dfu_utils_bytes_join_array (chunks);
} }
@ -505,13 +504,7 @@ fu_csr_device_download (FuDevice *device, GBytes *blob, GError **error)
/* all done */ /* all done */
blob_empty = g_bytes_new (NULL, 0); blob_empty = g_bytes_new (NULL, 0);
if (!fu_csr_device_download_chunk (self, idx, blob_empty, error)) return fu_csr_device_download_chunk (self, idx, blob_empty, error);
return FALSE;
/* notify UI */
fu_device_set_status (device, FWUPD_STATUS_IDLE);
return TRUE;
} }
static gboolean static gboolean

View File

@ -545,7 +545,6 @@ fu_ebitdo_device_write_firmware (FuDevice *device, GBytes *fw, GError **error)
} }
/* success! */ /* success! */
fu_device_set_status (device, FWUPD_STATUS_IDLE);
return TRUE; return TRUE;
} }

View File

@ -154,7 +154,6 @@ fu_plugin_update_prepare (FuPlugin *plugin,
g_prefix_error (error, "failed to get original firmware: "); g_prefix_error (error, "failed to get original firmware: ");
return FALSE; return FALSE;
} }
fu_device_set_status (device, FWUPD_STATUS_IDLE);
} }
return TRUE; return TRUE;
@ -198,6 +197,5 @@ fu_plugin_update (FuPlugin *plugin,
return FALSE; return FALSE;
/* success */ /* success */
fu_device_set_status (device, FWUPD_STATUS_IDLE);
return TRUE; return TRUE;
} }

View File

@ -1576,7 +1576,7 @@ fu_engine_install_blob (FuEngine *self,
} }
/* make the UI update */ /* make the UI update */
fu_device_set_status (device, FWUPD_STATUS_IDLE); fu_engine_set_status (self, FWUPD_STATUS_IDLE);
fu_engine_emit_changed (self); fu_engine_emit_changed (self);
g_debug ("Updating %s took %f seconds", fu_device_get_name (device), g_debug ("Updating %s took %f seconds", fu_device_get_name (device),
g_timer_elapsed (timer, NULL)); g_timer_elapsed (timer, NULL));