summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-08-14 16:10:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-12 23:14:49 +0000
commite0930192bee6cf770d7f9b4757150eb5ad48994f (patch)
tree3588173e5f74388d1b2777090659106903843588 /core
parente9b78fdbbef558f5e84f88397daf990dcc2e29cb (diff)
parent84392d74fef177a87bc96a255761daf39569e726 (diff)
downloadframeworks_base-e0930192bee6cf770d7f9b4757150eb5ad48994f.zip
frameworks_base-e0930192bee6cf770d7f9b4757150eb5ad48994f.tar.gz
frameworks_base-e0930192bee6cf770d7f9b4757150eb5ad48994f.tar.bz2
Merge "Store the WebView's package info." into lmp-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/WebViewFactory.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index ec589a5..c7ffedc 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -72,12 +72,17 @@ public final class WebViewFactory {
private static WebViewFactoryProvider sProviderInstance;
private static final Object sProviderLock = new Object();
private static boolean sAddressSpaceReserved = false;
+ private static PackageInfo sPackageInfo;
public static String getWebViewPackageName() {
return AppGlobals.getInitialApplication().getString(
com.android.internal.R.string.config_webViewPackageName);
}
+ public static PackageInfo getLoadedPackageInfo() {
+ return sPackageInfo;
+ }
+
static WebViewFactoryProvider getProvider() {
synchronized (sProviderLock) {
// For now the main purpose of this function (and the factory abstraction) is to keep
@@ -125,9 +130,9 @@ public final class WebViewFactory {
try {
// First fetch the package info so we can log the webview package version.
String packageName = getWebViewPackageName();
- PackageInfo pi = initialApplication.getPackageManager().getPackageInfo(packageName, 0);
- Log.i(LOGTAG, "Loading " + packageName + " version " + pi.versionName +
- " (code " + pi.versionCode + ")");
+ sPackageInfo = initialApplication.getPackageManager().getPackageInfo(packageName, 0);
+ Log.i(LOGTAG, "Loading " + packageName + " version " + sPackageInfo.versionName +
+ " (code " + sPackageInfo.versionCode + ")");
// Construct a package context to load the Java code into the current app.
Context webViewContext = initialApplication.createPackageContext(packageName,