зеркало из https://github.com/mozilla/gecko-dev.git
Bug 976450 - Clear cache and try again when librecovery fails, r=dhylands
This commit is contained in:
Родитель
9f4ba75dba
Коммит
e6d3acbb4b
|
@ -66,7 +66,12 @@ RecoveryService.prototype = {
|
|||
#ifdef MOZ_WIDGET_GONK
|
||||
// If this succeeds, then the device reboots and this never returns
|
||||
if (librecovery.factoryReset() != 0) {
|
||||
log("Error: Factory reset failed");
|
||||
log("Error: Factory reset failed. Trying again after clearing cache.");
|
||||
}
|
||||
var cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
|
||||
cache.clear();
|
||||
if (librecovery.factoryReset() != 0) {
|
||||
log("Error: Factory reset failed again");
|
||||
}
|
||||
#endif
|
||||
throw Cr.NS_ERROR_FAILURE;
|
||||
|
@ -76,7 +81,12 @@ RecoveryService.prototype = {
|
|||
#ifdef MOZ_WIDGET_GONK
|
||||
// If this succeeds, then the device reboots and this never returns
|
||||
if (librecovery.installFotaUpdate(updatePath, updatePath.length) != 0) {
|
||||
log("Error: FOTA install failed");
|
||||
log("Error: FOTA install failed. Trying again after clearing cache.");
|
||||
}
|
||||
var cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
|
||||
cache.clear();
|
||||
if (librecovery.installFotaUpdate(updatePath, updatePath.length) != 0) {
|
||||
log("Error: FOTA install failed again");
|
||||
}
|
||||
#endif
|
||||
throw Cr.NS_ERROR_FAILURE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче