aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device-provider-upower.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/device-provider-upower.c b/src/device-provider-upower.c
index bfee80f..f9b5e18 100644
--- a/src/device-provider-upower.c
+++ b/src/device-provider-upower.c
@@ -229,6 +229,9 @@ static void
refresh_device_soon (IndicatorPowerDeviceProviderUPower * self,
const char * object_path)
{
+ // Android: Ignore batt_therm devices since they give wrong values
+ if (g_str_has_suffix(object_path, "batt_therm"))
+ return;
priv_t * p = get_priv(self);
g_hash_table_add (p->queued_paths, g_strdup (object_path));
@@ -266,8 +269,11 @@ on_enumerate_devices_response(GObject * bus,
ao = g_variant_get_child_value(v, 0);
g_variant_iter_init(&iter, ao);
path = NULL;
- while(g_variant_iter_loop(&iter, "o", &path))
- refresh_device_soon (gself, path);
+ while(g_variant_iter_loop(&iter, "o", &path)) {
+ // Android: Ignore batt_therm devices since they give wrong values
+ if (!g_str_has_suffix(path, "batt_therm"))
+ refresh_device_soon (gself, path);
+ }
g_variant_unref(ao);
}
@@ -284,6 +290,9 @@ on_device_properties_changed(GDBusConnection * connection G_GNUC_UNUSED,
GVariant * parameters,
gpointer gself)
{
+ // Android: Ignore batt_therm devices since they give wrong values
+ if (g_str_has_suffix(object_path, "batt_therm"))
+ return;
IndicatorPowerDeviceProviderUPower* self;
priv_t* p;
IndicatorPowerDevice* device;