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

AW: extend Samsung workaround for other mail app

This relaxes the check for the Samsung workaround landed in
http://crrev/c/924115, so that the workaround applies for Samsung's
other mail app which also reproduces this behavior.

Although the other mail app is referred to as
"com.samsung.android.email.provider" in our communication with them, its
implementation is actually split among 5 different APKs, and it is
"*.composer" which actually exhibits the bug.

As it turns out, the bug reproduces under the exact same sequence of
URL navigations as the other app (a file:// URL followed by
loadDataWithBaseURL("email://")).

As with http://crrev/c/924115, this is also meant as a temporary
workaround.

Bug: 781535
Test: Use both Samsung apps, test the 3 repro conditions listed in b/70696775.
Change-Id: Ic897a33dc52b78e83eaada5b4b66c555a0eb3679
Reviewed-on: https://chromium-review.googlesource.com/981691
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548280}
parent 28f3c498
......@@ -133,7 +133,6 @@ 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;
......@@ -886,6 +885,14 @@ public class AwContents implements SmartClipProvider {
});
}
private boolean isSamsungMailApp() {
// There are 2 different Samsung mail apps exhibiting bugs related to
// http://crbug.com/781535.
String currentPackageName = mContext.getPackageName();
return "com.android.email".equals(currentPackageName)
|| "com.samsung.android.email.composer".equals(currentPackageName);
}
boolean isFullScreen() {
return mFullScreenTransitionsState.isFullScreen();
}
......@@ -1674,8 +1681,7 @@ public class AwContents implements SmartClipProvider {
// 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())) {
if (isSamsungMailApp() && SAMSUNG_WORKAROUND_BASE_URL.equals(loadUrlParams.getBaseUrl())) {
ThreadUtils.postOnUiThreadDelayed(
() -> loadUrl(loadUrlParams), SAMSUNG_WORKAROUND_DELAY);
return;
......
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