mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Merge b2g-inbound to mozilla-central a=merge CLOSED TREE
This commit is contained in:
commit
ce6e0dc416
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -139,7 +139,7 @@
|
||||
<project name="platform/system/core" path="system/core" revision="53d584d4a4b4316e4de9ee5f210d662f89b44e7e"/>
|
||||
<project name="u-boot" path="u-boot" revision="982c1fd67b89d5573317c1796cf5b0143de44e8a"/>
|
||||
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="6974f8e771d4d8e910357a6739ab124768891e8f"/>
|
||||
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="8ecfad58dfca5def20c7f7a51d251a89023c8c7c"/>
|
||||
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="1f4dea73da4f71e9f160a51c1d8cdad03f0a0ba6"/>
|
||||
<project name="vendor/sprd/partner" path="vendor/sprd/partner" revision="8649c7145972251af11b0639997edfecabfc7c2e"/>
|
||||
<project name="vendor/sprd/proprietories" path="vendor/sprd/proprietories" revision="d2466593022f7078aaaf69026adf3367c2adb7bb"/>
|
||||
</manifest>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f11d3c6500659e3232fbe6fe7ea0204c40ab7fdd"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f11d3c6500659e3232fbe6fe7ea0204c40ab7fdd"/>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "51051a09cdd5b1a3c6d2edcc9dd718823adabb59",
|
||||
"revision": "71b84df868bbdae9ebf334234db1660148c9741b",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f11d3c6500659e3232fbe6fe7ea0204c40ab7fdd"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0db8a38f9fed18ae2abf5ef7e1b6e2a570b07e0e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cb1dad4881533bff9f06d47e34983c7b10c04a8c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -229,6 +229,20 @@ static const char* const gOmxTypes[] = {
|
||||
"video/webm",
|
||||
"audio/webm",
|
||||
#endif
|
||||
"audio/x-matroska",
|
||||
"video/mp2t",
|
||||
"video/avi",
|
||||
"video/x-matroska",
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char* const gB2GOnlyTypes[] = {
|
||||
"audio/3gpp",
|
||||
"audio/amr",
|
||||
"audio/x-matroska",
|
||||
"video/mp2t",
|
||||
"video/avi",
|
||||
"video/x-matroska",
|
||||
nullptr
|
||||
};
|
||||
|
||||
@ -242,6 +256,12 @@ IsOmxSupportedType(const nsACString& aType)
|
||||
return CodecListContains(gOmxTypes, aType);
|
||||
}
|
||||
|
||||
static bool
|
||||
IsB2GSupportOnlyType(const nsACString& aType)
|
||||
{
|
||||
return CodecListContains(gB2GOnlyTypes, aType);
|
||||
}
|
||||
|
||||
static char const *const gH264Codecs[9] = {
|
||||
"avc1.42E01E", // H.264 Constrained Baseline Profile Level 3.0
|
||||
"avc1.42001E", // H.264 Baseline Profile Level 3.0
|
||||
@ -543,9 +563,9 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
|
||||
#endif
|
||||
#ifdef MOZ_OMX_DECODER
|
||||
if (IsOmxSupportedType(aType)) {
|
||||
// AMR audio is enabled for MMS, but we are discouraging Web and App
|
||||
// developers from using AMR, thus we only allow AMR to be played on WebApps.
|
||||
if (aType.EqualsLiteral(AUDIO_AMR) || aType.EqualsLiteral(AUDIO_3GPP)) {
|
||||
// we are discouraging Web and App developers from using those formats in
|
||||
// gB2GOnlyTypes, thus we only allow them to be played on WebApps.
|
||||
if (IsB2GSupportOnlyType(aType)) {
|
||||
dom::HTMLMediaElement* element = aOwner->GetMediaElement();
|
||||
if (!element) {
|
||||
return nullptr;
|
||||
@ -716,10 +736,11 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
|
||||
return
|
||||
IsOggType(aType) ||
|
||||
#ifdef MOZ_OMX_DECODER
|
||||
// We support amr inside WebApps on firefoxOS but not in general web content.
|
||||
// Ensure we dont create a VideoDocument when accessing amr URLs directly.
|
||||
// We support the formats in gB2GOnlyTypes only inside WebApps on firefoxOS
|
||||
// but not in general web content. Ensure we dont create a VideoDocument
|
||||
// when accessing those format URLs directly.
|
||||
(IsOmxSupportedType(aType) &&
|
||||
(!aType.EqualsLiteral(AUDIO_AMR) && !aType.EqualsLiteral(AUDIO_3GPP))) ||
|
||||
!IsB2GSupportOnlyType(aType)) ||
|
||||
#endif
|
||||
#ifdef MOZ_WEBM
|
||||
IsWebMType(aType) ||
|
||||
|
@ -22,6 +22,8 @@ const kPrefDefaultServiceId = "dom.sms.defaultServiceId";
|
||||
const kPrefRilDebuggingEnabled = "ril.debugging.enabled";
|
||||
const kPrefRilNumRadioInterfaces = "ril.numRadioInterfaces";
|
||||
|
||||
const kDiskSpaceWatcherObserverTopic = "disk-space-watcher";
|
||||
|
||||
const kSmsReceivedObserverTopic = "sms-received";
|
||||
const kSilentSmsReceivedObserverTopic = "silent-sms-received";
|
||||
const kSmsSendingObserverTopic = "sms-sending";
|
||||
@ -106,6 +108,7 @@ function SmsService() {
|
||||
Services.prefs.addObserver(kPrefRilDebuggingEnabled, this, false);
|
||||
Services.prefs.addObserver(kPrefDefaultServiceId, this, false);
|
||||
Services.obs.addObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
Services.obs.addObserver(this, kDiskSpaceWatcherObserverTopic, false);
|
||||
}
|
||||
SmsService.prototype = {
|
||||
classID: GONK_SMSSERVICE_CID,
|
||||
@ -755,6 +758,26 @@ SmsService.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Report SMS storage status to modem.
|
||||
*
|
||||
* Note: GonkDiskSpaceWatcher repeats the notification every 5 seconds when
|
||||
* storage is full.
|
||||
* Report status to modem only when the availability is changed.
|
||||
* Set |_smsStorageAvailable| to |null| to ensure the first run after
|
||||
* bootup.
|
||||
*/
|
||||
_smsStorageAvailable: null,
|
||||
_reportSmsMemoryStatus: function(aIsAvailable) {
|
||||
if (this._smsStorageAvailable !== aIsAvailable) {
|
||||
this._smsStorageAvailable = aIsAvailable;
|
||||
for (let serviceId = 0; serviceId < gRadioInterfaces.length; serviceId++) {
|
||||
gRadioInterfaces[serviceId]
|
||||
.sendWorkerMessage("reportSmsMemoryStatus", { isAvailable: aIsAvailable });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// An array of slient numbers.
|
||||
_silentNumbers: null,
|
||||
_isSilentNumber: function(aNumber) {
|
||||
@ -1029,12 +1052,19 @@ SmsService.prototype = {
|
||||
this.smsDefaultServiceId = this._getDefaultServiceId();
|
||||
}
|
||||
break;
|
||||
case kDiskSpaceWatcherObserverTopic:
|
||||
if (DEBUG) {
|
||||
debug("Observe " + kDiskSpaceWatcherObserverTopic + ": " + aData);
|
||||
}
|
||||
this._reportSmsMemoryStatus(aData != "full");
|
||||
break;
|
||||
case NS_XPCOM_SHUTDOWN_OBSERVER_ID:
|
||||
// Release the CPU wake lock for handling the received SMS.
|
||||
this._releaseSmsHandledWakeLock();
|
||||
Services.prefs.removeObserver(kPrefRilDebuggingEnabled, this);
|
||||
Services.prefs.removeObserver(kPrefDefaultServiceId, this);
|
||||
Services.obs.removeObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
|
||||
Services.obs.removeObserver(this, kDiskSpaceWatcherObserverTopic);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,5 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
component {f9b9b5e2-73b4-11e4-83ff-a33e27428c86} SmsService.js
|
||||
contract @mozilla.org/sms/gonksmsservice;1 {f9b9b5e2-73b4-11e4-83ff-a33e27428c86}
|
||||
contract @mozilla.org/sms/gonksmsservice;1 {f9b9b5e2-73b4-11e4-83ff-a33e27428c86}
|
||||
category profile-after-change SmsService @mozilla.org/sms/gonksmsservice;1
|
@ -165,7 +165,7 @@ SettingsServiceLock.prototype = {
|
||||
get: function get(aName, aCallback) {
|
||||
if (VERBOSE) debug("get (" + this._id + "): " + aName);
|
||||
if (!this._open) {
|
||||
dump("Settings lock not open!\n");
|
||||
if (DEBUG) debug("Settings lock not open!\n");
|
||||
throw Components.results.NS_ERROR_ABORT;
|
||||
}
|
||||
let reqID = uuidgen.generateUUID().toString();
|
||||
@ -195,33 +195,33 @@ SettingsServiceLock.prototype = {
|
||||
|
||||
callHandle: function callHandle(aCallback, aName, aValue) {
|
||||
try {
|
||||
aCallback ? aCallback.handle(aName, aValue) : null;
|
||||
aCallback && aCallback.handle ? aCallback.handle(aName, aValue) : null;
|
||||
} catch (e) {
|
||||
dump("settings 'handle' callback threw an exception, dropping: " + e + "\n");
|
||||
if (DEBUG) debug("settings 'handle' callback threw an exception, dropping: " + e + "\n");
|
||||
}
|
||||
},
|
||||
|
||||
callAbort: function callAbort(aCallback, aMessage) {
|
||||
try {
|
||||
aCallback ? aCallback.handleAbort(aMessage) : null;
|
||||
aCallback && aCallback.handleAbort ? aCallback.handleAbort(aMessage) : null;
|
||||
} catch (e) {
|
||||
dump("settings 'abort' callback threw an exception, dropping: " + e + "\n");
|
||||
if (DEBUG) debug("settings 'abort' callback threw an exception, dropping: " + e + "\n");
|
||||
}
|
||||
},
|
||||
|
||||
callError: function callError(aCallback, aMessage) {
|
||||
try {
|
||||
aCallback ? aCallback.handleError(aMessage) : null;
|
||||
aCallback && aCallback.handleError ? aCallback.handleError(aMessage) : null;
|
||||
} catch (e) {
|
||||
dump("settings 'error' callback threw an exception, dropping: " + e + "\n");
|
||||
if (DEBUG) debug("settings 'error' callback threw an exception, dropping: " + e + "\n");
|
||||
}
|
||||
},
|
||||
|
||||
callTransactionHandle: function callTransactionHandle() {
|
||||
try {
|
||||
this._transactionCallback ? this._transactionCallback.handle() : null;
|
||||
this._transactionCallback && this._transactionCallback.handle ? this._transactionCallback.handle() : null;
|
||||
} catch (e) {
|
||||
dump("settings 'Transaction handle' callback threw an exception, dropping: " + e + "\n");
|
||||
if (DEBUG) debug("settings 'Transaction handle' callback threw an exception, dropping: " + e + "\n");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -546,6 +546,12 @@ RilObject.prototype = {
|
||||
* { options: options of the corresponding dialing request }
|
||||
*/
|
||||
this.pendingMO = null;
|
||||
|
||||
/**
|
||||
* True when the request to report SMS Memory Status is pending.
|
||||
*/
|
||||
this.pendingToReportSmsMemoryStatus = false;
|
||||
this.smsStorageAvailable = true;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -2064,6 +2070,23 @@ RilObject.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Report SMS storage status to modem.
|
||||
*/
|
||||
_updateSmsMemoryStatus: function() {
|
||||
let Buf = this.context.Buf;
|
||||
Buf.newParcel(REQUEST_REPORT_SMS_MEMORY_STATUS);
|
||||
Buf.writeInt32(1);
|
||||
Buf.writeInt32(this.smsStorageAvailable ? 1 : 0);
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
reportSmsMemoryStatus: function(options) {
|
||||
this.pendingToReportSmsMemoryStatus = true;
|
||||
this.smsStorageAvailable = options.isAvailable;
|
||||
this._updateSmsMemoryStatus();
|
||||
},
|
||||
|
||||
setCellBroadcastDisabled: function(options) {
|
||||
this.cellBroadcastDisabled = options.disabled;
|
||||
|
||||
@ -2127,8 +2150,9 @@ RilObject.prototype = {
|
||||
let numConfigs = config ? config.length / 2 : 0;
|
||||
Buf.writeInt32(numConfigs);
|
||||
for (let i = 0; i < config.length;) {
|
||||
// convert [from, to) to [from, to - 1]
|
||||
Buf.writeInt32(config[i++]);
|
||||
Buf.writeInt32(config[i++]);
|
||||
Buf.writeInt32(config[i++] - 1);
|
||||
Buf.writeInt32(0x00);
|
||||
Buf.writeInt32(0xFF);
|
||||
Buf.writeInt32(1);
|
||||
@ -4786,7 +4810,7 @@ RilObject.prototype = {
|
||||
// MSG_TYPE | 8
|
||||
// TOTAL_SEGMENTS | 8
|
||||
// SEGMENT_NUMBER | 8
|
||||
// DATAGRAM | (NUM_FIELDS – 3) * 8
|
||||
// DATAGRAM | (NUM_FIELDS - 3) * 8
|
||||
let index = 0;
|
||||
if (message.data[index++] !== 0) {
|
||||
if (DEBUG) this.context.debug("Ignore a WAP Message which is not WDP.");
|
||||
@ -6562,7 +6586,9 @@ RilObject.prototype[REQUEST_GET_SMSC_ADDRESS] = function REQUEST_GET_SMSC_ADDRES
|
||||
this.sendChromeMessage(options);
|
||||
};
|
||||
RilObject.prototype[REQUEST_SET_SMSC_ADDRESS] = null;
|
||||
RilObject.prototype[REQUEST_REPORT_SMS_MEMORY_STATUS] = null;
|
||||
RilObject.prototype[REQUEST_REPORT_SMS_MEMORY_STATUS] = function REQUEST_REPORT_SMS_MEMORY_STATUS(length, options) {
|
||||
this.pendingToReportSmsMemoryStatus = options.rilRequestError != ERROR_SUCCESS;
|
||||
};
|
||||
RilObject.prototype[REQUEST_REPORT_STK_SERVICE_IS_RUNNING] = null;
|
||||
RilObject.prototype[REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE] = null;
|
||||
RilObject.prototype[REQUEST_ISIM_AUTHENTICATION] = null;
|
||||
@ -6710,6 +6736,10 @@ RilObject.prototype[UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED] = function UNSOLIC
|
||||
this._attachDataRegistration) {
|
||||
this.setDataRegistration({attach: true});
|
||||
}
|
||||
|
||||
if (this.pendingToReportSmsMemoryStatus) {
|
||||
this._updateSmsMemoryStatus();
|
||||
}
|
||||
}
|
||||
|
||||
this.radioState = newState;
|
||||
|
@ -74,7 +74,7 @@ add_test(function test_ril_worker_cellbroadcast_config() {
|
||||
|
||||
let found = false;
|
||||
worker.postRILMessage = function(id, parcel) {
|
||||
u32Parcel = U32ArrayFromParcelArray(Array.slice(parcel));
|
||||
let u32Parcel = U32ArrayFromParcelArray(Array.slice(parcel));
|
||||
if (u32Parcel[1] != parcelType) {
|
||||
return;
|
||||
}
|
||||
@ -95,7 +95,7 @@ add_test(function test_ril_worker_cellbroadcast_config() {
|
||||
// nums [(from, to, 0, 0xFF, 1), ... ]
|
||||
test(false,
|
||||
[1, 2, 4, 7] /* 1, 4-6 */,
|
||||
["2", "1,2,0,255,1", "4,7,0,255,1"].join());
|
||||
["2", "1,1,0,255,1", "4,6,0,255,1"].join());
|
||||
|
||||
// (CDMA) RIL writes the following data to outgoing parcel:
|
||||
// nums [(id, 0, 1), ... ]
|
||||
|
@ -224,7 +224,7 @@ Telephony::DialInternal(uint32_t aServiceId, const nsAString& aNumber,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsITelephonyDialCallback> callback =
|
||||
new TelephonyDialCallback(GetOwner(), this, promise, aServiceId);
|
||||
new TelephonyDialCallback(GetOwner(), this, promise);
|
||||
|
||||
nsresult rv = mService->Dial(aServiceId, aNumber, aEmergency, callback);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -16,10 +16,8 @@ NS_IMPL_ISUPPORTS_INHERITED(TelephonyDialCallback, TelephonyCallback,
|
||||
|
||||
TelephonyDialCallback::TelephonyDialCallback(nsPIDOMWindow* aWindow,
|
||||
Telephony* aTelephony,
|
||||
Promise* aPromise,
|
||||
uint32_t aServiceId)
|
||||
: TelephonyCallback(aPromise), mWindow(aWindow), mTelephony(aTelephony),
|
||||
mServiceId(aServiceId)
|
||||
Promise* aPromise)
|
||||
: TelephonyCallback(aPromise), mWindow(aWindow), mTelephony(aTelephony)
|
||||
{
|
||||
MOZ_ASSERT(mTelephony);
|
||||
}
|
||||
@ -52,12 +50,13 @@ TelephonyDialCallback::NotifyDialMMI(const nsAString& aServiceCode)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyDialCallback::NotifyDialCallSuccess(uint32_t aCallIndex,
|
||||
TelephonyDialCallback::NotifyDialCallSuccess(uint32_t aClientId,
|
||||
uint32_t aCallIndex,
|
||||
const nsAString& aNumber)
|
||||
{
|
||||
nsRefPtr<TelephonyCallId> id = mTelephony->CreateCallId(aNumber);
|
||||
nsRefPtr<TelephonyCall> call =
|
||||
mTelephony->CreateCall(id, mServiceId, aCallIndex,
|
||||
mTelephony->CreateCall(id, aClientId, aCallIndex,
|
||||
nsITelephonyService::CALL_STATE_DIALING);
|
||||
|
||||
mPromise->MaybeResolve(call);
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
NS_DECL_NSITELEPHONYDIALCALLBACK
|
||||
|
||||
TelephonyDialCallback(nsPIDOMWindow* aWindow, Telephony* aTelephony,
|
||||
Promise* aPromise, uint32_t aServiceId);
|
||||
Promise* aPromise);
|
||||
|
||||
NS_FORWARD_NSITELEPHONYCALLBACK(TelephonyCallback::)
|
||||
|
||||
@ -44,7 +44,6 @@ private:
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> mWindow;
|
||||
nsRefPtr<Telephony> mTelephony;
|
||||
uint32_t mServiceId;
|
||||
|
||||
nsString mServiceCode;
|
||||
nsRefPtr<MMICall> mMMICall;
|
||||
|
@ -645,10 +645,12 @@ TelephonyService.prototype = {
|
||||
Object.keys(this._currentCalls[aClientId])[0];
|
||||
|
||||
if (currentCdmaCallIndex == null) {
|
||||
aCallback.notifyDialCallSuccess(response.callIndex, response.number);
|
||||
aCallback.notifyDialCallSuccess(aClientId, response.callIndex,
|
||||
response.number);
|
||||
} else {
|
||||
// RIL doesn't hold the 2nd call. We create one by ourselves.
|
||||
aCallback.notifyDialCallSuccess(CDMA_SECOND_CALL_INDEX, response.number);
|
||||
aCallback.notifyDialCallSuccess(aClientId, CDMA_SECOND_CALL_INDEX,
|
||||
response.number);
|
||||
this._addCdmaChildCall(aClientId, response.number, currentCdmaCallIndex);
|
||||
}
|
||||
});
|
||||
|
@ -28,6 +28,7 @@ struct ErrorResponse
|
||||
|
||||
struct DialResponseCallSuccess
|
||||
{
|
||||
uint32_t clientId;
|
||||
uint32_t callIndex;
|
||||
nsString number;
|
||||
};
|
||||
|
@ -215,7 +215,8 @@ TelephonyRequestChild::DoResponse(const DialResponseCallSuccess& aResponse)
|
||||
{
|
||||
MOZ_ASSERT(mCallback);
|
||||
nsCOMPtr<nsITelephonyDialCallback> callback = do_QueryInterface(mCallback);
|
||||
callback->NotifyDialCallSuccess(aResponse.callIndex(), aResponse.number());
|
||||
callback->NotifyDialCallSuccess(aResponse.clientId(), aResponse.callIndex(),
|
||||
aResponse.number());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -588,10 +588,12 @@ TelephonyRequestParent::NotifyError(const nsAString& aError)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialCallSuccess(uint32_t aCallIndex,
|
||||
TelephonyRequestParent::NotifyDialCallSuccess(uint32_t aClientId,
|
||||
uint32_t aCallIndex,
|
||||
const nsAString& aNumber)
|
||||
{
|
||||
return SendResponse(DialResponseCallSuccess(aCallIndex, nsAutoString(aNumber)));
|
||||
return SendResponse(DialResponseCallSuccess(aClientId, aCallIndex,
|
||||
nsAutoString(aNumber)));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -191,7 +191,7 @@ interface nsITelephonyCallback : nsISupports
|
||||
/**
|
||||
* A callback interface for handling asynchronous response for telephony.dial.
|
||||
*/
|
||||
[scriptable, uuid(ac5fa441-a48a-4efb-af08-48a0f41fde63)]
|
||||
[scriptable, uuid(e16c6e6f-93c6-4e1e-99bf-592b98f67e15)]
|
||||
interface nsITelephonyDialCallback : nsITelephonyCallback
|
||||
{
|
||||
/**
|
||||
@ -207,12 +207,16 @@ interface nsITelephonyDialCallback : nsITelephonyCallback
|
||||
* Called when a dial request is treated as a call setup and the result
|
||||
* succeeds.
|
||||
*
|
||||
* @param clientId
|
||||
Indicate the RIL client, 0 ~ (number of client - 1).
|
||||
* @param callIndex
|
||||
* Call index from RIL.
|
||||
* @param number
|
||||
* Dialed out phone number (ex: Temporary CLIR prefix will be removed)
|
||||
*/
|
||||
void notifyDialCallSuccess(in unsigned long callIndex, in AString number);
|
||||
void notifyDialCallSuccess(in unsigned long cliendId,
|
||||
in unsigned long callIndex,
|
||||
in AString number);
|
||||
|
||||
/**
|
||||
* Called when a MMI code request succeeds.
|
||||
|
@ -1662,6 +1662,10 @@ nsEventStatus AsyncPanZoomController::OnLongPress(const TapGestureInput& aEvent)
|
||||
int32_t modifiers = WidgetModifiersToDOMModifiers(aEvent.modifiers);
|
||||
CSSPoint geckoScreenPoint;
|
||||
if (ConvertToGecko(aEvent.mLocalPoint, &geckoScreenPoint)) {
|
||||
if (CurrentTouchBlock()->IsDuringFastMotion()) {
|
||||
APZC_LOG("%p dropping long-press because of fast motion\n", this);
|
||||
return nsEventStatus_eIgnore;
|
||||
}
|
||||
uint64_t blockId = GetInputQueue()->InjectNewTouchBlock(this);
|
||||
controller->HandleLongTap(geckoScreenPoint, modifiers, GetGuid(), blockId);
|
||||
return nsEventStatus_eConsumeNoDefault;
|
||||
|
@ -110,6 +110,7 @@ InputQueue::ReceiveTouchInput(const nsRefPtr<AsyncPanZoomController>& aTarget,
|
||||
// the target isn't confirmed and the real target turns out to be something
|
||||
// else. For now assume this is rare enough that it's not an issue.
|
||||
if (block->IsDuringFastMotion()) {
|
||||
INPQ_LOG("dropping event due to block %p being in fast motion\n", block);
|
||||
result = nsEventStatus_eConsumeNoDefault;
|
||||
} else if (target && target->ArePointerEventsConsumable(block, aEvent.AsMultiTouchInput().mTouches.Length())) {
|
||||
result = nsEventStatus_eConsumeDoDefault;
|
||||
@ -224,8 +225,8 @@ InputQueue::InjectNewTouchBlock(AsyncPanZoomController* aTarget)
|
||||
TouchBlockState* block = StartNewTouchBlock(aTarget,
|
||||
/* aTargetConfirmed = */ true,
|
||||
/* aCopyAllowedTouchBehaviorFromCurrent = */ true);
|
||||
INPQ_LOG("%p injecting new touch block with id %" PRIu64 " and target %p\n",
|
||||
this, block->GetBlockId(), aTarget);
|
||||
INPQ_LOG("injecting new touch block %p with id %" PRIu64 " and target %p\n",
|
||||
block, block->GetBlockId(), aTarget);
|
||||
ScheduleMainThreadTimeout(aTarget, block->GetBlockId());
|
||||
return block->GetBlockId();
|
||||
}
|
||||
|
@ -239,6 +239,16 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
|
||||
if (mDragMode == START_FRAME || mDragMode == END_FRAME) {
|
||||
if (mActiveTouchId == nowTouchId) {
|
||||
ptInRoot.y += mCaretCenterToDownPointOffsetY;
|
||||
|
||||
if (mDragMode == START_FRAME) {
|
||||
if (ptInRoot.y > mDragDownYBoundary) {
|
||||
ptInRoot.y = mDragDownYBoundary;
|
||||
}
|
||||
} else if (mDragMode == END_FRAME) {
|
||||
if (ptInRoot.y < mDragUpYBoundary) {
|
||||
ptInRoot.y = mDragUpYBoundary;
|
||||
}
|
||||
}
|
||||
return DragSelection(ptInRoot);
|
||||
}
|
||||
|
||||
@ -515,6 +525,17 @@ SelectionCarets::UpdateSelectionCarets()
|
||||
SetEndFramePos(lastRectInCanvasFrame.BottomRight());
|
||||
SetVisibility(true);
|
||||
|
||||
nsRect firstRectInRootFrame = firstRectInStartFrame;
|
||||
nsRect lastRectInRootFrame = lastRectInEndFrame;
|
||||
nsLayoutUtils::TransformRect(startFrame, rootFrame, firstRectInRootFrame);
|
||||
nsLayoutUtils::TransformRect(endFrame, rootFrame, lastRectInRootFrame);
|
||||
|
||||
// Use half of the first(last) rect as the dragup(dragdown) boundary
|
||||
mDragUpYBoundary =
|
||||
(firstRectInRootFrame.BottomLeft().y + firstRectInRootFrame.TopLeft().y) / 2;
|
||||
mDragDownYBoundary =
|
||||
(lastRectInRootFrame.BottomRight().y + lastRectInRootFrame.TopRight().y) / 2;
|
||||
|
||||
nsRect rectStart = GetStartFrameRect();
|
||||
nsRect rectEnd = GetEndFrameRect();
|
||||
bool isTilt = rectStart.Intersects(rectEnd);
|
||||
|
@ -241,6 +241,20 @@ private:
|
||||
int32_t mActiveTouchId;
|
||||
|
||||
nscoord mCaretCenterToDownPointOffsetY;
|
||||
|
||||
// The horizontal boundary is defined by the first selected frame which
|
||||
// determines the start-caret position. When users drag the end-caret up,
|
||||
// the touch input(pos.y) will be changed to not cross this boundary.
|
||||
// Otherwise, the selection range changes to one character only
|
||||
// which causes the bad user experience.
|
||||
nscoord mDragUpYBoundary;
|
||||
// The horizontal boundary is defined by the last selected frame which
|
||||
// determines the end-caret position. When users drag the start-caret down,
|
||||
// the touch input(pos.y) will be changed to not cross this boundary.
|
||||
// Otherwise, the selection range changes to one character only
|
||||
// which causes the bad user experience.
|
||||
nscoord mDragDownYBoundary;
|
||||
|
||||
DragMode mDragMode;
|
||||
|
||||
// True if AsyncPanZoom is enabled
|
||||
|
@ -81,6 +81,7 @@
|
||||
#define AUDIO_AMR "audio/amr"
|
||||
#define AUDIO_3GPP "audio/3gpp"
|
||||
#define AUDIO_MIDI "audio/x-midi"
|
||||
#define AUDIO_MATROSKA "audio/x-matroska"
|
||||
|
||||
#define BINARY_OCTET_STREAM "binary/octet-stream"
|
||||
|
||||
@ -148,6 +149,9 @@
|
||||
#define VIDEO_WEBM "video/webm"
|
||||
#define VIDEO_3GPP "video/3gpp"
|
||||
#define VIDEO_3GPP2 "video/3gpp2"
|
||||
#define VIDEO_MPEG_TS "video/mp2t"
|
||||
#define VIDEO_AVI "video/avi"
|
||||
#define VIDEO_MATROSKA "video/x-matroska"
|
||||
#define APPLICATION_OGG "application/ogg"
|
||||
|
||||
/* x-uuencode-apple-single. QuickMail made me do this. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Extensions we recognize for DeviceStorage storage areas
|
||||
pictures=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp;
|
||||
music=*.mp3; *.oga; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka;
|
||||
videos=*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.3g2; *.ogg; *.m4v;
|
||||
music=*.mp3; *.oga; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka; *.mka;
|
||||
videos=*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.3g2; *.ogg; *.m4v; *.ts; *.m2ts; *.avi; *.divx; *.mkv;
|
||||
|
@ -542,6 +542,12 @@ static nsExtraMimeTypeEntry extraMimeEntries [] =
|
||||
{ AUDIO_OGG, "opus", "Opus Audio" },
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
{ AUDIO_AMR, "amr", "Adaptive Multi-Rate Audio" },
|
||||
{ VIDEO_AVI, "avi", "Audio Video Interleave" },
|
||||
{ VIDEO_AVI, "divx", "Audio Video Interleave" },
|
||||
{ VIDEO_MPEG_TS, "ts", "MPEG Transport Stream" },
|
||||
{ VIDEO_MPEG_TS, "m2ts", "MPEG-2 Transport Stream" },
|
||||
{ VIDEO_MATROSKA, "mkv", "MATROSKA VIDEO" },
|
||||
{ AUDIO_MATROSKA, "mka", "MATROSKA AUDIO" },
|
||||
#endif
|
||||
{ VIDEO_WEBM, "webm", "Web Media Video" },
|
||||
{ AUDIO_WEBM, "webm", "Web Media Audio" },
|
||||
|
Loading…
Reference in New Issue
Block a user