зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to m-i
This commit is contained in:
Коммит
92e66a2a0b
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"revision": "94ed925b75d033a1e38577960143c8a627c76deb",
|
||||
"revision": "9621115bda40a25eb4edff44a142b487a200e558",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -1005,8 +1005,14 @@ BluetoothHfpManager::Connect(const nsAString& aDeviceAddress,
|
|||
}
|
||||
|
||||
if (mSocket) {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_REACHED_CONNECTION_LIMIT));
|
||||
if (mDeviceAddress == aDeviceAddress) {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_ALREADY_CONNECTED));
|
||||
} else {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_REACHED_CONNECTION_LIMIT));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -247,8 +247,13 @@ BluetoothOppManager::Connect(const nsAString& aDeviceAddress,
|
|||
}
|
||||
|
||||
if (mSocket) {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_REACHED_CONNECTION_LIMIT));
|
||||
if (mConnectedDeviceAddress == aDeviceAddress) {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_ALREADY_CONNECTED));
|
||||
} else {
|
||||
DispatchBluetoothReply(aRunnable, BluetoothValue(),
|
||||
NS_LITERAL_STRING(ERR_REACHED_CONNECTION_LIMIT));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,9 +7,15 @@
|
|||
#ifndef mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
|
||||
#define mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
|
||||
|
||||
#define ERR_SERVICE_CHANNEL_NOT_FOUND "DeviceChannelRetrievalError"
|
||||
#define ERR_REACHED_CONNECTION_LIMIT "ReachedConnectionLimitError"
|
||||
#define ERR_NO_AVAILABLE_RESOURCE "NoAvailableResourceError"
|
||||
/**
|
||||
* Error Messages used in Bluetooth profiles
|
||||
*
|
||||
* These error messages would be sent to Gaia as an argument of onError event.
|
||||
*/
|
||||
#define ERR_ALREADY_CONNECTED "AlreadyConnectedError"
|
||||
#define ERR_NO_AVAILABLE_RESOURCE "NoAvailableResourceError"
|
||||
#define ERR_REACHED_CONNECTION_LIMIT "ReachedConnectionLimitError"
|
||||
#define ERR_SERVICE_CHANNEL_NOT_FOUND "DeviceChannelRetrievalError"
|
||||
|
||||
#include "BluetoothCommon.h"
|
||||
#include "nsIObserver.h"
|
||||
|
|
|
@ -15,7 +15,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
||||
VPATH += $(srcdir)/android
|
||||
else ifdef MOZ_B2G_RIL
|
||||
VPATH += $(srcdir)/ril
|
||||
VPATH += $(srcdir)/gonk
|
||||
else
|
||||
VPATH += $(srcdir)/fallback
|
||||
endif
|
||||
|
@ -44,10 +44,10 @@ LOCAL_INCLUDES += \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
ril/MmsService.js \
|
||||
ril/MmsService.manifest \
|
||||
ril/MobileMessageDatabaseService.js \
|
||||
ril/MobileMessageDatabaseService.manifest \
|
||||
gonk/MmsService.js \
|
||||
gonk/MmsService.manifest \
|
||||
gonk/MobileMessageDatabaseService.js \
|
||||
gonk/MobileMessageDatabaseService.manifest \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
Cu.import("resource://gre/modules/PhoneNumberUtils.jsm");
|
||||
|
||||
const RIL_MMSSERVICE_CONTRACTID = "@mozilla.org/mms/rilmmsservice;1";
|
||||
const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}");
|
||||
|
@ -1571,7 +1572,11 @@ MmsService.prototype = {
|
|||
if (receivers.length != 0) {
|
||||
let headersTo = headers["to"] = [];
|
||||
for (let i = 0; i < receivers.length; i++) {
|
||||
headersTo.push({"address": receivers[i], "type": "PLMN"});
|
||||
let normalizedAddress = PhoneNumberUtils.normalize(receivers[i], false);
|
||||
if (DEBUG) debug("createSavableFromParams: normalize phone number " +
|
||||
"from " + receivers[i] + " to " + normalizedAddress);
|
||||
|
||||
headersTo.push({"address": normalizedAddress, "type": "PLMN"});
|
||||
}
|
||||
}
|
||||
if (aParams.subject) {
|
|
@ -7,7 +7,7 @@
|
|||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
mmsdir = 'android'
|
||||
elif CONFIG['MOZ_B2G_RIL']:
|
||||
mmsdir = 'ril'
|
||||
mmsdir = 'gonk'
|
||||
else:
|
||||
mmsdir = 'fallback'
|
||||
|
||||
|
@ -23,10 +23,10 @@ EXPORTS.mozilla.dom.mobilemessage += [
|
|||
|
||||
if CONFIG['MOZ_B2G_RIL']:
|
||||
EXTRA_JS_MODULES = [
|
||||
'ril/MmsPduHelper.jsm',
|
||||
'ril/WspPduHelper.jsm',
|
||||
'ril/mms_consts.js',
|
||||
'ril/wap_consts.js',
|
||||
'gonk/MmsPduHelper.jsm',
|
||||
'gonk/WspPduHelper.jsm',
|
||||
'gonk/mms_consts.js',
|
||||
'gonk/wap_consts.js',
|
||||
]
|
||||
else:
|
||||
EXPORTS.mozilla.dom.mobilemessage += [
|
||||
|
|
|
@ -678,8 +678,15 @@ this.PushService = {
|
|||
else if (this._currentState == STATE_READY) {
|
||||
// Send a ping.
|
||||
// Bypass the queue; we don't want this to be kept pending.
|
||||
this._ws.sendMsg('{}');
|
||||
debug("Sent ping.");
|
||||
// Watch out for exception in case the socket has disconnected.
|
||||
// When this happens, we pretend the ping was sent and don't specially
|
||||
// handle the exception, as the lack of a pong will lead to the socket
|
||||
// being reset.
|
||||
try {
|
||||
this._ws.sendMsg('{}');
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
this._waitingForPong = true;
|
||||
this._setAlarm(prefs.get("requestTimeout"));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче