зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154947 part 2: Use variant in the URL update.
We need a different update URL for each device variant. This allows us to provide updates for both user and userdebug device variants. The solution we came with is appending the variant (build type) in the product device string. To avoid breaking existing phones, we do only for non-user build types.
This commit is contained in:
Родитель
80c589d3da
Коммит
ea6477d7d0
|
@ -3496,10 +3496,15 @@ Checker.prototype = {
|
|||
if (AppConstants.platform == "gonk") {
|
||||
let sysLibs = {};
|
||||
Cu.import("resource://gre/modules/systemlibs.js", sysLibs);
|
||||
let productDevice = sysLibs.libcutils.property_get("ro.product.device");
|
||||
let buildType = sysLibs.libcutils.property_get("ro.build.type");
|
||||
url = url.replace(/%PRODUCT_MODEL%/g,
|
||||
sysLibs.libcutils.property_get("ro.product.model"));
|
||||
url = url.replace(/%PRODUCT_DEVICE%/g,
|
||||
sysLibs.libcutils.property_get("ro.product.device"));
|
||||
if (buildType == "user") {
|
||||
url = url.replace(/%PRODUCT_DEVICE%/g, productDevice);
|
||||
} else {
|
||||
url = url.replace(/%PRODUCT_DEVICE%/g, productDevice + "-" + buildType);
|
||||
}
|
||||
url = url.replace(/%B2G_VERSION%/g,
|
||||
getPref("getCharPref", PREF_APP_B2G_VERSION, null));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче