Bug 872983 - event.settingValue in mozSettings.onsettingchange gives wrong value. r=fabrice
Bug 875390 - Add MMSC and/or MMS Proxy specific host routes via MMS APN. r=vyang

MMS sending has been failing because often the default network route was
not going through the MMS APN. This commit adds specific host route via
the correct network interface for either MMSC or MMS proxy depending on
the carrier information. We also perform DNS resolution to cope with
MMSC/proxy that are using FQDN.
Merge m-c to birch.
Bug 875677 - Modify the logic of sending 'callheld' indicator to fit HFP 1.6, r=gyeh

According to HFP spec 1.6, we should update callheld status very carefully when
the status of other calls are changed.
Bug 878005 - Send system message 'ATD>' to Gaia instead of sending 'BLDN' when receive 'ATD>' from headset, r=gyeh
Bug 762329 - Add an extra check to browserElement_LoadEvents.js. r=vingtetun

A long time ago this check failed in-process, but it seems to work now.

--HG--
extra : rebase_source : 5eea1b1d16a616d32be6ad61a8e661645cdec959
Merge m-c to birch.
Bug 874501 - Don't translate letters to numbers when finding contacts. r=bent

--HG--
extra : rebase_source : 5d5a6904aea2430c0521fa6ca3d898c5ce3ab6b2
Bug 877777 - Take into consideration entire givenName/familyName array when sorting contacts. r=bent

--HG--
extra : rebase_source : b5752c08613314fd206caf73921538094d86e670
Bug 877003 - Convert TestSettingsAPI.cpp to a mochitest-chrome. r=fabrice

--HG--
extra : rebase_source : c8807e7651ad1493008832345a74b82da4c6333c
Bug 830290: Cleanup DBus EventLoop function r=bent,qdot

We intent to run the DBus thread's EventLoop function as separate
nsRunnable, but the function also contains code for initializing
sockets that are used for internal communication.

With this patch the socket initialization has been moved to the
setup function. This reduces the EventLoop function to plain event
handling.
Bug 830290: Added DBusPollTask r=bent,qdot

This patch adds class DBusPollTask. The DBusPollTask class is an
nsRunnable for receiving DBus messages. It is intended to run in
a separate thread that is dedicated to DBus only.

The Run function of the poll task resembles the DBus EventLoop
function, but allows to intercept execution in favor of other
nsRunnables. Afterwards the DBusPollTask continues.
Bug 830290: Use DBusPollTask r=bent,qdot

This patch replaces the DBus EventLoop function by an instance
of DBusPollTask. It also cleans up the initialization and shutdown
code of the DBusThread.
Bug 830290: Added dispatch function for DBus thread r=bent,qdot

The new function allows to schedule nsRunnables to an existing DBus
thread. This intercepts the running instance of DBusPollTask and
makes the DBus thread process the dispatched runnable. The intercepted
poll task automatically continues polling once all pending runnables
have been processed.
Bug 830290: Setup asyncronous DBus messages in DBus thread r=bent,qdot

This patch finally fixes bug 827888 were a message's reply was
received before the respective handler function could be installed.

The patch adds the class DBusConnectionSendWithReplyTask, which
asyncronously sends a DBus message and installs the reply's handler
function. The DBus utility functions for asyncronous messages create
an instance of this class and dispatch it to the DBus thread. This
intercepts the DBusPollTask, so no DBus replies can be received until
the dispatched DBusConnectionSendWithReplyTask has finished.
Bug 830290: Cleanup DBusConnectionSendWithReplyTask r=bent,qdot

The class DBusConnectionSendWithReplyTask has been renamed to
DBusConnectionSendWithReplyRunnable, which better fits its purpose. The
internal callback function and data has been move into the implementation
of DBusConnectionSendWithReplyRunnable. Additionally, there is now an
abstract base class for DBus send runnables. This class will become useful
for implementing send classes with different policies.
Bug 830290: Execute DBus send operation in DBus thread r=bent,qdot

The DBus send operation simply sends a DBus message without further
processing of replies. If the sender is interested in a reply, the
respective serial number can be returned. In this case, the sending
operation (and only the sending) is serialized with the calling
thread.
Bug 830290: Replace dbus_connection_send by dbus_func_send r=bent,qdot

The Bluetooth system now uses dbus_func_send for sending DBus
messages where dbus_connection_send use used before. The former
function is similar to the latter one, but sends messages from
within the DBus thread; thus avoiding concurrency issues within
DBus.
Bug 830290: Send blocking DBus messages from within DBus thread r=bent,qdot

The this commit moves the sending of blocking DBus messages to the
DBus thread. This allows us to avoid concurrency problems within the
DBus library, which is not explicitly thread-safe.

As a side note, I'd like to mention that blocking in distributed
systems simply doesn't work. The dbus library is especially broken
in this regard as it delays all unrelated messages until the reply
for the blocking request has been received. A future commit should
implement this functionality with an asyncronous call and make the
related thread wait for the reply.
Bug 830290: Replace calls to dbus_connection_send_with_reply_and_block r=bent,qdot

There is one call to dbus_connection_send_with_reply_and_block in
the Bluetooth code. This patch replaces the call by a call to the
helper function dbus_func_send_and_block, which executes the DBus
operation within the DBus thread.