Merge m-c and inbound.

This commit is contained in:
Ryan VanderMeulen 2013-07-03 09:14:15 -04:00
commit 2f32b96e0b
5 changed files with 37 additions and 18 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "aa2108bb5f5478c4f3a7ce5a2f4c534b60045c95",
"revision": "4567d6a94813cf88067d466557debe720820828f",
"repo_path": "/integration/gaia-central"
}

View File

@ -79,6 +79,13 @@ XPCOMUtils.defineLazyGetter(this, "updateSvc", function() {
const DIRECTORY_NAME = WEBAPP_RUNTIME ? "WebappRegD" : "ProfD";
#endif
// We'll use this to identify privileged apps that have been preinstalled
// For those apps we'll set
// STORE_ID_PENDING_PREFIX + installOrigin
// as the storeID. This ensures it's unique and can't be set from a legit
// store even by error.
const STORE_ID_PENDING_PREFIX = "#unknownID#";
this.DOMApplicationRegistry = {
appsFile: null,
webapps: { },
@ -346,6 +353,11 @@ this.DOMApplicationRegistry = {
app.origin = "app://" + aId;
// Do this for all preinstalled apps... we can't know at this
// point if the updates will be signed or not and it doesn't
// hurt to have it always.
app.storeId = STORE_ID_PENDING_PREFIX + app.installOrigin;
// Extract the manifest.webapp file from application.zip.
let zipFile = baseDir.clone();
zipFile.append("application.zip");
@ -2253,7 +2265,8 @@ this.DOMApplicationRegistry = {
function checkForStoreIdMatch(aStoreId, aStoreVersion) {
// Things to check:
// 1. if it's a update:
// a. We should already have this storeId
// a. We should already have this storeId, or the original storeId must start
// with STORE_ID_PENDING_PREFIX
// b. The manifestURL for the stored app should be the same one we're
// updating
// c. And finally the version of the update should be higher than the one
@ -2267,14 +2280,17 @@ this.DOMApplicationRegistry = {
let appId = self.getAppLocalIdByStoreId(aStoreId);
let isInstalled = appId != Ci.nsIScriptSecurityManager.NO_APP_ID;
if (aIsUpdate) {
if (!isInstalled || (app.localId !== appId)) {
// If we don't have the storeId on track already, this
// cannot be an update
let isDifferent = app.localId !== appId;
let isPending = app.storeId.indexOf(STORE_ID_PENDING_PREFIX) == 0;
if ((!isInstalled && !isPending) || (isInstalled && isDifferent)) {
throw "WRONG_APP_STORE_ID";
}
if (app.storeVersion >= aStoreVersion) {
if (!isPending && (app.storeVersion >= aStoreVersion)) {
throw "APP_STORE_VERSION_ROLLBACK";
}
} else if (isInstalled) {
throw "WRONG_APP_STORE_ID";
}

View File

@ -810,9 +810,9 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
// See bug 884190 for more information.
NotifyDialer(NS_LITERAL_STRING("CHLD=0"));
} else if (chld == '1') {
NotifyDialer(NS_LITERAL_STRING("CHUP+ATA"));
NotifyDialer(NS_LITERAL_STRING("CHLD=1"));
} else if (chld == '2') {
NotifyDialer(NS_LITERAL_STRING("CHLD+ATA"));
NotifyDialer(NS_LITERAL_STRING("CHLD=2"));
} else {
NS_WARNING("Wrong value of command [AT+CHLD]");
valid = false;

View File

@ -68,6 +68,8 @@ TelephonyListener::NotifyError(int32_t aCallIndex,
const nsAString& aError)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
if (aCallIndex > 0) {
// In order to not miss any related call state transition.
// It's possible that 3G network signal lost for unknown reason.
// If a call is released abnormally, NotifyError() will be called,
@ -77,6 +79,8 @@ TelephonyListener::NotifyError(int32_t aCallIndex,
nsITelephonyProvider::CALL_STATE_DISCONNECTED,
EmptyString(), false, true);
NS_WARNING("Reset the call state due to call transition ends abnormally");
}
NS_WARNING(NS_ConvertUTF16toUTF8(aError).get());
return NS_OK;
}

View File

@ -1626,7 +1626,6 @@ MmsService.prototype = {
"media": content.type,
"params": params
},
"content-length": content.size,
"content-location": location,
"content-id": attachment.id
},