From 375d1656a9947acce2bb9a2b740eccb513196bab Mon Sep 17 00:00:00 2001 From: dengbo Date: Thu, 14 Sep 2023 16:42:26 +0800 Subject: [PATCH] fix: dock bluetooth module is missing dock depends dde-session-daemon bluetooth adapter add signal to show bluetooth module Log: (cherry picked from commit a46ed1c3201001e7692cf9599b5bd43390c7217d) --- bluetooth1/bluetooth.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bluetooth1/bluetooth.go b/bluetooth1/bluetooth.go index f92ccbcf5..bc4a951c8 100644 --- a/bluetooth1/bluetooth.go +++ b/bluetooth1/bluetooth.go @@ -344,6 +344,18 @@ func (b *Bluetooth) init() { b.adapters.mu.Lock() b.adapters.infos = adapterInfos b.adapters.mu.Unlock() + for _, adapterInfo := range adapterInfos { + data, err := json.Marshal(adapterInfo) + if err != nil { + logger.Warning(err) + continue + } + err = b.service.Emit(b, "AdapterAdded", string(data)) + if err != nil { + logger.Warning(err) + continue + } + } } else { logger.Warning(err) }