Commit da8150a6 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW: workaround Samsung mail app issue

This applies a workaround for one of Samsung's OEM mail apps which was
negatively affected by PlzNavigate. This is meant as a minimal temporary
workaround until we finish investigation on the issue.

The app is loading 2 URLs (a file:// URL followed by
loadDataWithBaseUrl) in quick succession. This workaround posts the
second load by 200ms. In my testing, I've found that 40ms is more than
enough, so 200ms should be very safe (but still fast enough to not
adversely impact user experience).

Bug: 781535
Test: manual - with the actual Samsung mail app
Change-Id: I1fdb002c377af083158a5dc4e0e7ce067a176d30
Reviewed-on: https://chromium-review.googlesource.com/924115Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537428}
parent 980bc8e7
......@@ -134,6 +134,10 @@ public class AwContents implements SmartClipProvider {
private static final double MIN_SCREEN_HEIGHT_PERCENTAGE_FOR_INTERSTITIAL = 0.7;
private static final String SAMSUNG_WORKAROUND_PACKAGE_NAME = "com.android.email";
private static final String SAMSUNG_WORKAROUND_BASE_URL = "email://";
private static final int SAMSUNG_WORKAROUND_DELAY = 200;
private static class ForceAuxiliaryBitmapRendering {
private static final boolean sResult = lazyCheck();
private static boolean lazyCheck() {
......@@ -1688,6 +1692,15 @@ public class AwContents implements SmartClipProvider {
return;
}
}
// This is a workaround for an issue with PlzNavigate and one of Samsung's OEM mail apps.
// See http://crbug.com/781535.
if (SAMSUNG_WORKAROUND_PACKAGE_NAME.equals(mContext.getPackageName())
&& SAMSUNG_WORKAROUND_BASE_URL.equals(loadUrlParams.getBaseUrl())) {
ThreadUtils.postOnUiThreadDelayed(
() -> loadUrl(loadUrlParams), SAMSUNG_WORKAROUND_DELAY);
return;
}
loadUrl(loadUrlParams);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment