We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c798dbd commit 67df4d5Copy full SHA for 67df4d5
1 file changed
src/rfkill.vala
@@ -117,9 +117,19 @@ public class RFKillManager : Object {
117
set_software_lock (WIMAX, value);
118
set_software_lock (WMAN, value);
119
120
- // Some hardware keys still turn off bluetooth
+ /*
121
+ * Some hardware keys still turn off bluetooth so we iterate over
122
+ * devices to check if bluetooth was hardware locked and unlock it
123
+ * but we don't want to toggle it back on if it was manually disabled
124
+ * in software
125
+ */
126
if (!value) {
- set_software_lock (BLUETOOTH, false);
127
+ foreach (unowned var device in get_devices ()) {
128
+ if (device.device_type == BLUETOOTH && device.hardware_lock) {
129
+ set_software_lock (BLUETOOTH, false);
130
+ break;
131
+ }
132
133
}
134
135
0 commit comments