[Android] Fixed crash when Tab Groups or Conditional Tab Strip are enabled
This commit is contained in:
@@ -104,6 +104,10 @@ public class BraveToolbarManager extends ToolbarManager {
|
||||
@Override
|
||||
public void enableBottomControls() {
|
||||
ViewStub viewStub = mActivity.findViewById(R.id.bottom_controls_stub);
|
||||
if (!BottomToolbarConfiguration.isBottomToolbarEnabled() || viewStub == null) {
|
||||
super.enableBottomControls();
|
||||
return;
|
||||
}
|
||||
viewStub.setOnInflateListener((stub, inflated) -> { mRootBottomView = inflated; });
|
||||
mBottomControlsCoordinator = new BraveBottomControlsCoordinator(
|
||||
BottomTabSwitcherActionMenuCoordinator.createOnLongClickListener(
|
||||
|
||||
+3
-2
@@ -23,8 +23,9 @@ public class BottomToolbarConfiguration {
|
||||
private static final int SMALL_SCREEN_HEIGHT = 640;
|
||||
|
||||
public static boolean isBottomToolbarEnabled() {
|
||||
if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(
|
||||
ContextUtils.getApplicationContext())) {
|
||||
if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(ContextUtils.getApplicationContext())
|
||||
|| TabUiFeatureUtilities.isTabGroupsAndroidEnabled()
|
||||
|| TabUiFeatureUtilities.isConditionalTabStripEnabled()) {
|
||||
return false;
|
||||
}
|
||||
SharedPreferences sharedPreferences = ContextUtils.getAppSharedPreferences();
|
||||
|
||||
Reference in New Issue
Block a user