Use the WebView's loader library to load the real library.
Load libwebviewchromiumloader and use it to load the real WebView
library, to enable sharing of the relro segment between different
application processes without requiring that the library be preloaded in
the zygote. A system service is added to track whether the relro segment
file has been prepared, and block loading of the library until it has
been.
Bug: 13005501
Change-Id: I846b37c7b8e2a4eb8a39e4fd455bccbb2048c173
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 8d38827..a6030cf 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -49,6 +49,7 @@
import android.util.Log;
import android.util.Slog;
import android.view.WindowManager;
+import android.webkit.WebViewFactory;
import com.android.internal.R;
import com.android.internal.os.BinderInternal;
@@ -91,6 +92,7 @@
import com.android.server.twilight.TwilightService;
import com.android.server.usb.UsbService;
import com.android.server.wallpaper.WallpaperManagerService;
+import com.android.server.webkit.WebViewUpdateService;
import com.android.server.wm.WindowManagerService;
import dalvik.system.VMRuntime;
@@ -408,6 +410,12 @@
Slog.i(TAG, "Reading configuration...");
SystemConfig.getInstance();
+ Slog.i(TAG, "WebView Update Service");
+ ServiceManager.addService("webviewupdate", new WebViewUpdateService());
+
+ Slog.i(TAG, "WebViewFactory preparation");
+ WebViewFactory.prepareWebViewInSystemServer();
+
Slog.i(TAG, "Scheduling Policy");
ServiceManager.addService("scheduling_policy", new SchedulingPolicyService());