Commit 04006bac authored by Cathy Li's avatar Cathy Li Committed by Commit Bot

[Touchless]: Adjust initial scroll position of ESP on touchless devices.

Bug: 977248
Change-Id: Ic1190f11013894dc51ae92588f48ee550880610b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670111Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Commit-Queue: Cathy Li <chili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671422}
parent 1f3ab0e4
......@@ -29,6 +29,7 @@ import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabObserver;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.browser.util.UrlConstants;
import org.chromium.chrome.browser.widget.RoundedIconGenerator;
import org.chromium.content_public.browser.NavigationController;
......@@ -180,10 +181,11 @@ public class ExploreSitesPage extends BasicNativePage {
});
// We don't want to scroll to the 4th category if personalized
// or integrated with Most Likely.
// or integrated with Most Likely, or if we're on a touchless device.
int variation = ExploreSitesBridge.getVariation();
mInitialScrollPosition = variation == ExploreSitesVariation.PERSONALIZED
|| ExploreSitesBridge.isIntegratedWithMostLikely(variation)
|| FeatureUtilities.isNoTouchModeEnabled()
? INITIAL_SCROLL_POSITION_PERSONALIZED
: INITIAL_SCROLL_POSITION;
......
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