summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-10-31 14:56:54 -0700
committerThe Android Automerger <android-build@google.com>2013-11-05 13:49:24 -0800
commit9774612b57f08afa9f178ba1d89d9b95dd32d85e (patch)
treecabe342ad823e94fd3153c17059c0491c730570b
parentfd9f28836527c828fc83554c49f216bc85a3df42 (diff)
downloadbase-9774612b57f08afa9f178ba1d89d9b95dd32d85e.tar.gz
Set persist.sys.dalvik.vm.lib at system server startup
Bug: 11463182 Change-Id: I4409e84570c4e27bf8da36d0aca87812a1c032a6
-rw-r--r--core/java/com/android/internal/os/RuntimeInit.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 5538dca2a4fa..69b593a6fb56 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -104,6 +104,18 @@ public class RuntimeInit {
Thread.setDefaultUncaughtExceptionHandler(new UncaughtHandler());
/*
+ * In case the runtime switched since last boot (such as when
+ * the old runtime was removed in an OTA), set the system
+ * property so that it is in sync. We can't do this in
+ * libnativehelper's JniInvocation::Init code where we already
+ * had to fallback to a different runtime because it is
+ * running as root and we need to be the system user to set
+ * the property. http://b/11463182
+ */
+ SystemProperties.set("persist.sys.dalvik.vm.lib",
+ VMRuntime.getRuntime().vmLibrary());
+
+ /*
* Install a TimezoneGetter subclass for ZoneInfo.db
*/
TimezoneGetter.setInstance(new TimezoneGetter() {