summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorGustav Sennton <gsennton@google.com>2016-01-08 13:47:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-01-08 13:47:14 +0000
commit472a566956b557576db3b383d3e6f1dd2eaf0fcb (patch)
treefd7d398dd1232d295289b5e897f60ea9776f318d /core/java/android
parent65c783539482c52fcdd63112536c00a287e58d90 (diff)
parentfc424478a9e6c253238afe22ca174789d72e0682 (diff)
Merge "Add missing traces for WebView loading steps."
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/webkit/WebViewFactory.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index 6aa5e2f573bd..9f08b214a849 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -271,18 +271,25 @@ public final class WebViewFactory {
private static Class<WebViewFactoryProvider> getProviderClass() {
try {
- // First fetch the package info so we can log the webview package version.
- int res = waitForProviderAndSetPackageInfo();
- if (res != LIBLOAD_SUCCESS) {
- throw new MissingWebViewPackageException(
- "Failed to load WebView provider, error: "
- + getWebViewPreparationErrorReason(res));
+ Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW,
+ "WebViewFactory.waitForProviderAndSetPackageInfo()");
+ try {
+ // First fetch the package info so we can log the webview package version.
+ int res = waitForProviderAndSetPackageInfo();
+ if (res != LIBLOAD_SUCCESS) {
+ throw new MissingWebViewPackageException(
+ "Failed to load WebView provider, error: "
+ + getWebViewPreparationErrorReason(res));
+ }
+ } finally {
+ Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
}
Log.i(LOGTAG, "Loading " + sPackageInfo.packageName + " version " +
sPackageInfo.versionName + " (code " + sPackageInfo.versionCode + ")");
Application initialApplication = AppGlobals.getInitialApplication();
Context webViewContext = null;
+ Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "initialApplication.createPackageContext()");
try {
// Construct a package context to load the Java code into the current app.
// This is done as early as possible since by constructing a package context we
@@ -293,6 +300,8 @@ public final class WebViewFactory {
Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
} catch (PackageManager.NameNotFoundException e) {
throw new MissingWebViewPackageException(e);
+ } finally {
+ Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
}
Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "WebViewFactory.loadNativeLibrary()");