Merge "Fix NPE in WebView relro creator process."

This commit is contained in:
TreeHugger Robot
2017-10-04 18:45:41 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 3 deletions

View File

@@ -492,10 +492,15 @@ public final class WebViewFactory {
/** @hide */
public static IWebViewUpdateService getUpdateService() {
if (isWebViewSupported()) {
return IWebViewUpdateService.Stub.asInterface(
ServiceManager.getService(WEBVIEW_UPDATE_SERVICE_NAME));
return getUpdateServiceUnchecked();
} else {
return null;
}
}
/** @hide */
static IWebViewUpdateService getUpdateServiceUnchecked() {
return IWebViewUpdateService.Stub.asInterface(
ServiceManager.getService(WEBVIEW_UPDATE_SERVICE_NAME));
}
}

View File

@@ -80,7 +80,7 @@ class WebViewLibraryLoader {
} finally {
// We must do our best to always notify the update service, even if something fails.
try {
WebViewFactory.getUpdateService().notifyRelroCreationCompleted();
WebViewFactory.getUpdateServiceUnchecked().notifyRelroCreationCompleted();
} catch (RemoteException e) {
Log.e(LOGTAG, "error notifying update service", e);
}