xref: /OK3568_Linux_fs/debian/packages-patches/blueman/0002-Don-t-turn-off-the-bt-power.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 609563ec5590e7817b43f44a86e46b9f16c6e1b1 Mon Sep 17 00:00:00 2001
2From: xiaoyao <xiaoyao@rock-chips.com>
3Date: Mon, 12 Jun 2023 21:55:06 +0800
4Subject: [PATCH 1/1] Don't turn off the bt power
5
6---
7 blueman/plugins/mechanism/RfKill.py | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/blueman/plugins/mechanism/RfKill.py b/blueman/plugins/mechanism/RfKill.py
11index c3296403..677bc414 100644
12--- a/blueman/plugins/mechanism/RfKill.py
13+++ b/blueman/plugins/mechanism/RfKill.py
14@@ -15,5 +15,5 @@ class RfKill(MechanismPlugin):
15
16     def _set_rfkill_state(self, state, caller):
17         self.confirm_authorization(caller, "org.blueman.rfkill.setstate")
18-        with open('/dev/rfkill', 'r+b', buffering=0) as f:
19-            f.write(struct.pack("IBBBB", 0, RFKILL_TYPE_BLUETOOTH, RFKILL_OP_CHANGE_ALL, (0 if state else 1), 0))
20+        #with open('/dev/rfkill', 'r+b', buffering=0) as f:
21+        #    f.write(struct.pack("IBBBB", 0, RFKILL_TYPE_BLUETOOTH, RFKILL_OP_CHANGE_ALL, (0 if state else 1), 0))
22--
232.17.1
24
25