summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-02-07 10:59:28 +0100
committerBenjamin Berg <benjamin@sipsolutions.net>2022-02-07 15:16:50 +0000
commit13157bce0888a8d060963862c94aa8cdc0d3f657 (patch)
tree283e11950c71639b2df2d908c00939c2391fe205
parentda05dd4b81d92bf5600ef768e8b26f6b1db3a62d (diff)
linux: Update Bluetooth device alias when it changes
Closes: #169
-rw-r--r--src/linux/up-device-bluez.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/linux/up-device-bluez.c b/src/linux/up-device-bluez.c
index 032f310..2f174af 100644
--- a/src/linux/up-device-bluez.c
+++ b/src/linux/up-device-bluez.c
@@ -268,6 +268,10 @@ up_device_bluez_update (UpDeviceBluez *bluez,
"percentage", (gdouble) g_variant_get_byte (value),
"update-time", (guint64) g_get_real_time () / G_USEC_PER_SEC,
NULL);
+ } else if (g_str_equal (key, "Alias")) {
+ g_object_set (device,
+ "model", g_variant_get_string (value, NULL),
+ NULL);
} else {
char *str = g_variant_print (value, TRUE);