Commit c338ce85 authored by Angela S's avatar Angela S Committed by Commit Bot

chrome/android: Fixed bug in highlighting data saver menu footer

The data saver menu footer is supposed to be highlighted when the data
saver in-product help is shown but it is not. This patch fixed it by
changing the ID that is highlighted to be the inflatedID of the app menu footer
view stub.

BUG=747486

Change-Id: Iaf43badcf277dd424fc02fbafa4d27e51c03737c
Reviewed-on: https://chromium-review.googlesource.com/581879Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: Angela Shao <angelashao@google.com>
Cr-Commit-Position: refs/heads/master@{#488785}
parent bf166056
......@@ -1559,18 +1559,18 @@ public class Tab
// Don't show data saver footer if Chrome Home is enabled (temporary fix for M61)
if (FeatureUtilities.isChromeHomeEnabled()) return;
if (!tracker.shouldTriggerHelpUI(FeatureConstants.DATA_SAVER_DETAIL_FEATURE)) return;
showDataSaverInProductHelp(tracker);
maybeShowDataSaverInProductHelp(tracker);
}
private void showDataSaverInProductHelp(final FeatureEngagementTracker tracker) {
private void maybeShowDataSaverInProductHelp(final FeatureEngagementTracker tracker) {
if (!tracker.shouldTriggerHelpUI(FeatureConstants.DATA_SAVER_DETAIL_FEATURE)) return;
ViewAnchoredTextBubble textBubble = new ViewAnchoredTextBubble(getActivity(),
getActivity().getToolbarManager().getMenuButton(),
R.string.iph_data_saver_detail_text,
R.string.iph_data_saver_detail_accessibility_text);
textBubble.setDismissOnTouchInteraction(true);
getActivity().getAppMenuHandler().setMenuHighlight(R.id.data_reduction_footer);
getActivity().getAppMenuHandler().setMenuHighlight(R.id.app_menu_footer);
textBubble.addOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
......
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