Bug 1308631 - UpdateService: Do not apply update without update path. r?grisha
Update path can be null. In this case we fallback to using the last saved path. However
if this doesn't exist either then we just continue with a null path and eventually crash
the service.
MozReview-Commit-ID: Kuihp496TEo
--- a/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java
@@ -657,17 +657,20 @@ public class UpdateService extends Inten
return true;
}
private void applyUpdate(String updatePath) {
if (updatePath == null) {
updatePath = getLastFileName();
}
- applyUpdate(new File(updatePath));
+
+ if (updatePath != null) {
+ applyUpdate(new File(updatePath));
+ }
}
private void applyUpdate(File updateFile) {
mApplyImmediately = false;
if (!updateFile.exists())
return;