Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #20723 from bentian/bug-1026475-14
Browse files Browse the repository at this point in the history
Bug 1026475 - Device switch from Handset/Headset to BTSCO fails during call, r=etienne, a=1.4+
  • Loading branch information
Ben Tian committed Jun 19, 2014
2 parents 479db54 + 5ed14bc commit dff52e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/communications/dialer/js/call_screen.js
Expand Up @@ -120,7 +120,7 @@ var CallScreen = {
this.hideGroupDetails.bind(this));

this.switchToDeviceButton.addEventListener('click',
this.switchToDefaultOut.bind(this));
this.switchToDefaultOut.bind(this, false));
this.switchToReceiverButton.addEventListener('click',
this.switchToReceiver.bind(this));
this.switchToSpeakerButton.addEventListener('click',
Expand Down
3 changes: 1 addition & 2 deletions apps/communications/dialer/js/calls_handler.js
Expand Up @@ -54,8 +54,7 @@ var CallsHandler = (function callsHandler() {
if (acm) {
acm.addEventListener('headphoneschange', function onheadphoneschange() {
if (acm.headphones) {
// Do not connect bluetooth SCO if headphone is plugged in
CallScreen.switchToDefaultOut(true /* do not connect */);
CallScreen.switchToDefaultOut();
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/communications/dialer/test/unit/calls_handler_test.js
Expand Up @@ -1373,7 +1373,7 @@ suite('calls handler', function() {
test('should switch sound to default out', function() {
var toDefaultSpy = this.sinon.spy(MockCallScreen, 'switchToDefaultOut');
headphonesChange.yield();
assert.isTrue(toDefaultSpy.calledOnce);
assert.isTrue(toDefaultSpy.calledWithExactly());
});
});

Expand Down

0 comments on commit dff52e8

Please sign in to comment.