Commit f7dfd564 authored by Mohammed Sadiq's avatar Mohammed Sadiq
Browse files

Update patches

parent ddbab143
From e4225fecb1e0d662668346a8f5ce43a57941fa64 Mon Sep 17 00:00:00 2001
From: Mohammed Sadiq <sadiq@sadiqpk.org>
Date: Thu, 14 Nov 2019 13:56:17 +0530
Subject: [PATCH] power: Fix mobile broadband switch logic
Let the power switch be active (ie, powersave set to off) if either
of wimax or wwan device is enabled. And set the switch sensitive
if either of them present.
---
panels/power/cc-power-panel.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 98b19d0db..13f7cd517 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1520,11 +1520,16 @@ nm_client_state_changed (NMClient *client,
g_signal_handlers_unblock_by_func (self->wifi_switch, wifi_switch_changed, self);
visible = has_mobile_devices (self->nm_client);
+
+ /* Set the switch active, if either of wimax or wwan is enabled. */
active = nm_client_networking_get_enabled (client) &&
- nm_client_wimax_get_enabled (client) &&
- nm_client_wireless_hardware_get_enabled (client);
+ ((nm_client_wimax_get_enabled (client) &&
+ nm_client_wimax_hardware_get_enabled (client)) ||
+ (nm_client_wwan_get_enabled (client) &&
+ nm_client_wwan_hardware_get_enabled (client)));
sensitive = nm_client_networking_get_enabled (client) &&
- nm_client_wireless_hardware_get_enabled (client);
+ (nm_client_wwan_hardware_get_enabled (client) ||
+ nm_client_wimax_hardware_get_enabled (client));
g_debug ("mobile state changed to %s", active ? "enabled" : "disabled");
--
2.24.0
......@@ -12,6 +12,7 @@
0001-network-Don-t-show-modems-supported-by-cellular-pane.patch
0001-notification-Hide-lockscreen-notification-option.patch
0001-panel-list-Select-panel-iff-non-folded-when-search-i.patch
0001-power-Fix-mobile-broadband-switch-logic.patch
0001-privacy-Port-dialogs-to-HdyDialog.patch
0001-region-Implement-new-design-for-Formats-dialog.patch
0001-region-Tweak-format-dialog.patch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment