From 03287759beb51cf458c490eb6c308f795a49633e Mon Sep 17 00:00:00 2001 From: brave-builds Date: Tue, 31 Mar 2020 20:02:16 +0000 Subject: [PATCH] Uplift of #5116 (squashed) to release --- .../browser/toolbar/bottom/BraveBottomToolbarCoordinator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java index 2797b0dba0b0..66c066445438 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomToolbarCoordinator.java @@ -39,6 +39,7 @@ public class BraveBottomToolbarCoordinator private SearchAccelerator mSearchAccelerator; private BottomToolbarNewTabButton mNewTabButton; private ActivityTabProvider mBraveTabProvider; + private OnClickListener mOriginalHomeButtonListener; private final Context mContext = ContextUtils.getApplicationContext(); @@ -50,6 +51,7 @@ public class BraveBottomToolbarCoordinator super(stub, tabProvider, homeButtonListener, searchAcceleratorListener, shareButtonListener, tabsSwitcherLongClickListner, themeColorProvider); mBraveTabProvider = tabProvider; + mOriginalHomeButtonListener = homeButtonListener; } @Override @@ -99,7 +101,7 @@ void initializeWithNative(OnClickListener tabSwitcherListener, final OnClickListener homeButtonListener = v -> { final boolean isHomepageEnabled = HomepageManager.isHomepageEnabled(); if (isHomepageEnabled) { - TabUtils.openHomepage(); + mOriginalHomeButtonListener.onClick(v); } else { TabUtils.openNewTab(); }