Merge "Check for initialization of mUpdateEngine" am: e3a84af1a7 am: 0d39f92360

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1907970

Change-Id: I10d42d3c1a27430b377c0363e91a7e37b246ef07
This commit is contained in:
Treehugger Robot
2021-12-02 20:19:12 +00:00
committed by Automerger Merge Worker

View File

@@ -238,7 +238,7 @@ public class UpdateEngine {
public static final int DISABLED = 9;
}
private IUpdateEngine mUpdateEngine;
private final IUpdateEngine mUpdateEngine;
private IUpdateEngineCallback mUpdateEngineCallback = null;
private final Object mUpdateEngineCallbackLock = new Object();
@@ -248,6 +248,9 @@ public class UpdateEngine {
public UpdateEngine() {
mUpdateEngine = IUpdateEngine.Stub.asInterface(
ServiceManager.getService(UPDATE_ENGINE_SERVICE));
if (mUpdateEngine == null) {
throw new IllegalStateException("Failed to find update_engine");
}
}
/**