From b8dd117002a97f37260518d85d73634b71c55bce Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Wed, 24 Aug 2011 18:24:00 -0700 Subject: [PATCH] Remove needless clearView() - this is leftover from a time where we re-used a single WebView for multiple messages. The current architecture does not rely on that, so the clearView() is actually not useful. Worse - it's causing issues because the operation in the WebView is asynchronous, so a clearView and a load of the content in quick succession causes a race condition, causing items not to load Bug: 5205296 Change-Id: I5ee6697bdf53a033ba1c7f21170820259bf830d1 --- src/com/android/email/activity/MessageViewFragmentBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java index 8bf08f5e7..58a3d458d 100644 --- a/src/com/android/email/activity/MessageViewFragmentBase.java +++ b/src/com/android/email/activity/MessageViewFragmentBase.java @@ -494,6 +494,8 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O makeVisible(mLoadingProgress, !showContent && showProgressWhenHidden); } + // TODO: clean this up - most of this is not needed since the WebView and Fragment is not + // reused for multiple messages. protected void resetView() { showContent(false, false); updateTabs(0); @@ -501,7 +503,6 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O if (mMessageContentView != null) { blockNetworkLoads(true); mMessageContentView.scrollTo(0, 0); - mMessageContentView.clearView(); // Dynamic configuration of WebView final WebSettings settings = mMessageContentView.getSettings();