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

Bug 809704 - [Dialer] can using headset button to answer/hangup the phone call #6644

Merged
merged 1 commit into from Nov 28, 2012

Conversation

arcturus
Copy link
Contributor

Includes a bit of refactoring in the postMessage to the callscreen to pass messages from bluetooth and headset

r=@etiennesegonzac

command: command
};

callScreenWindow.postMessage(JSON.stringify(message), origin);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure you can postMessage(message, origin) directly...

@arcturus
Copy link
Contributor Author

@etiennesegonzac the strings 'BT' and 'HS' are shouting to me to be added as constants, any suggestion where to put them?

if (telephony.active) {
end();
} else {
answer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should call |holdAndAnswer()| if handledCalls.length > 1 to handle multiple calls properly.

@arcturus
Copy link
Contributor Author

@etiennesegonzac comments added!

@command: The specific message to each kind of type
*/
function sendCommandToCallScreen(type, command) {
if (callScreenWindow == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can if (!callScreenWindow) here and remove it from the 2 handlers.

@arcturus
Copy link
Contributor Author

Latest comments (removing 2 checks) added

bb+ r=@etiennesegonzac mergin \o/

arcturus added a commit that referenced this pull request Nov 28, 2012
Bug 809704 - [Dialer] can using headset button to answer/hangup the phone call
@arcturus arcturus merged commit 05b87d7 into mozilla-b2g:master Nov 28, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants