Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions bin/dde-system-daemon/bluetooth.go

This file was deleted.

52 changes: 0 additions & 52 deletions bin/dde-system-daemon/bluetooth_test.go

This file was deleted.

6 changes: 0 additions & 6 deletions bin/dde-system-daemon/exported_methods_auto.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

4 changes: 3 additions & 1 deletion bluetooth1/bluetooth_ifc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -291,6 +291,8 @@ func (b *Bluetooth) FeedPasskey(device dbus.ObjectPath, accept bool, passkey uin
return nil
}

// DebugInfo is retained for D-Bus compatibility. The system service returns
// an empty snapshot so this proxy cannot expose adapter or device details.
func (b *Bluetooth) DebugInfo() (info string, busErr *dbus.Error) {
logger.Info("dbus call DebugInfo")

Expand Down
8 changes: 5 additions & 3 deletions system/bluetooth1/bluetooth_ifc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -373,9 +373,11 @@ func (b *SysBluetooth) UnregisterAgent(sender dbus.Sender, agentPath dbus.Object
return nil
}

// DebugInfo is retained for D-Bus compatibility but no longer exposes
// adapter or device details.
func (b *SysBluetooth) DebugInfo() (info string, busErr *dbus.Error) {
info = fmt.Sprintf("adapters: %s\ndevices: %s", marshalJSON(b.adapters), marshalJSON(b.devices))
return info, nil
logger.Debug("dbus call DebugInfo")
return "", nil
}

// ClearUnpairedDevice will remove all device in unpaired list
Expand Down
19 changes: 19 additions & 0 deletions system/bluetooth1/bluetooth_ifc_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

package bluetooth

import "testing"

func TestDebugInfoDoesNotExposeBluetoothDetails(t *testing.T) {
b := &SysBluetooth{}

info, err := b.DebugInfo()
if err != nil {
t.Fatalf("DebugInfo returned an unexpected error: %v", err)
}
if want := ""; info != want {
t.Fatalf("DebugInfo returned %q, want %q", info, want)
}
}
Loading