From 6b64bc7afa41dffe35cf79d6433705986115afdb Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 22 Apr 2021 12:06:04 +0100 Subject: [PATCH] Check FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN when calculating the SUPPORTED flag If the device is on battery power, the device will have at least one inhibit and be in FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN state. It's still supported, and it's misleading to suggest there are no updates available. Just check both flags. Fixes the 3rd half (sic) of https://github.com/fwupd/fwupd/issues/3156 --- src/fu-engine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fu-engine.c b/src/fu-engine.c index 99a8a9e61..6d25afa9e 100644 --- a/src/fu-engine.c +++ b/src/fu-engine.c @@ -4580,7 +4580,8 @@ fu_engine_get_releases_for_device (FuEngine *self, } /* only show devices that can be updated */ - if (!fu_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE)) { + if (!fu_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE) && + !fu_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN)) { g_set_error_literal (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED,