Merge lp:~morphis/indicator-bluetooth/fix-lp1530807 into lp:indicator-bluetooth/15.10

Proposed by Simon Fels
Status: Approved
Approved by: Charles Kerr
Approved revision: 99
Proposed branch: lp:~morphis/indicator-bluetooth/fix-lp1530807
Merge into: lp:indicator-bluetooth/15.10
Diff against target: 15 lines (+4/-1)
1 file modified
src/bluez.vala (+4/-1)
To merge this branch: bzr merge lp:~morphis/indicator-bluetooth/fix-lp1530807
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Konrad Zapałowicz (community) Approve
Indicator Applet Developers Pending
Review via email: mp+290022@code.launchpad.net

Commit message

Try to power on bluetooth through bluez if rfkill is already unblocked

In situations where we have to active bluetooth and the rfkill is already unblocked we need to go straight and set the 'Powered' property of the BlueZ adapter to true. The code now checks if the rfkill already has the state it should be in and if yes just switches the 'Powered' property.

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

It is good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM.

review: Approve

Unmerged revisions

99. By Simon Fels

Remove changelog entry to be ready for landing

98. By Simon Fels

Fix version

97. By Simon Fels

Correctly check if killswitch already has the requested state and if yes
directly request BlueZ to switch the controller power state.

96. By Simon Fels

Check killswitch state before setting it

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/bluez.vala'
--- src/bluez.vala 2016-02-14 21:05:19 +0000
+++ src/bluez.vala 2016-03-24 11:12:29 +0000
@@ -437,7 +437,10 @@
437437
438 public void try_set_enabled (bool b)438 public void try_set_enabled (bool b)
439 {439 {
440 if (killswitch != null)440 // If either the killswitch is already in the state we request it
441 // here to switch to or we don't have a killswitch at all we
442 // directly switch to setting the powered property for BlueZ.
443 if (killswitch != null && killswitch.blocked == b)
441 {444 {
442 debug (@"setting killswitch blocked to $(!b)");445 debug (@"setting killswitch blocked to $(!b)");
443 killswitch.try_set_blocked (!b);446 killswitch.try_set_blocked (!b);

Subscribers

People subscribed via source and target branches