[Android] Hide BAT icon on tablet when rewards disabled by policy (#35400)

The maybeHideRewardsLayout() method controls rewards icon visibility on
tablets based on width but didn't check BraveRewardsPolicy, causing it
to override the main visibility logic that correctly hides the icon when
rewards are disabled.

Resolves: https://github.com/brave/brave-browser/issues/54358
This commit is contained in:
Serg
2026-04-09 19:50:14 +02:00
committed by GitHub
parent 83c86129c1
commit 9afe305769
@@ -1760,8 +1760,11 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
return;
}
Tab tab = getToolbarDataProvider().getTab();
Profile profile = tab != null ? Profile.fromWebContents(tab.getWebContents()) : null;
mRewardsLayout.setVisibility(
width >= DeviceFormFactor.getNonMultiDisplayMinimumTabletWidthPx(getContext())
&& !BraveRewardsPolicy.isDisabledByPolicy(profile)
? View.VISIBLE
: View.GONE);
// Update the shields layout background to match the rewards layout visibility.