Commit 0324da10 authored by Lijin Shen's avatar Lijin Shen Committed by Commit Bot

Fix failure to visit sites by clicking history after resizing screen

After resizing screen, clicking history items does not move to the
target site. It is caused by that application misregards the device as
a tablet while the view is still in mobile mode.

Bug: 1013516
Change-Id: I4f3869618c104d6ce458e42ecaf44e85162fc0a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930253Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Lijin Shen <lazzzis@google.com>
Cr-Commit-Position: refs/heads/master@{#718847}
parent a2a91a99
......@@ -54,7 +54,6 @@ import org.chromium.chrome.browser.widget.selection.SelectionDelegate;
import org.chromium.chrome.browser.widget.selection.SelectionDelegate.SelectionObserver;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.ui.base.Clipboard;
import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.base.PageTransition;
import java.util.List;
......@@ -375,11 +374,11 @@ public class HistoryManager implements OnMenuItemClickListener, SignInStateObser
// Determine component or class name.
ComponentName component;
if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity)) {
component = mActivity.getComponentName();
} else {
if (mActivity instanceof HistoryActivity) { // phone
component = IntentUtils.safeGetParcelableExtra(
mActivity.getIntent(), IntentHandler.EXTRA_PARENT_COMPONENT);
} else { // tablet
component = mActivity.getComponentName();
}
if (component != null) {
ChromeTabbedActivity.setNonAliasedComponent(viewIntent, component);
......
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