mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
f7c53e5766
commit
034b74b15f
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user