Skip to content

Commit

Permalink
fixed codereview notice
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyBarabash committed Oct 10, 2024
1 parent abee4f1 commit a15ac1b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.os.Build;

import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;

import org.chromium.base.BraveReflectionUtil;
Expand All @@ -24,9 +25,9 @@ class BraveTabbedNavigationBarColorControllerBase {
* This variable will be used instead of `TabGroupModelFilter#mContext`, that will be deleted in
* bytecode.
*/
protected Context mContext;
protected @Nullable Context mContext;

protected TabModelSelector mTabModelSelector;
protected @Nullable TabModelSelector mTabModelSelector;

// Calls from the upstream's private function
// `TabbedNavigationBarColorController#getNavigationBarColor`
Expand All @@ -37,7 +38,7 @@ public int getNavigationBarColor(boolean forceDarkNavigationBar) {
if (BottomToolbarConfiguration.isBottomToolbarEnabled()
&& BraveMenuButtonCoordinator.isMenuFromBottom()
&& mContext != null) {
if (mTabModelSelector.isIncognitoSelected()) {
if (mTabModelSelector != null && mTabModelSelector.isIncognitoSelected()) {
return mContext.getColor(R.color.toolbar_background_primary_dark);
} else {
return mContext.getColor(R.color.default_bg_color_baseline);
Expand Down

0 comments on commit a15ac1b

Please sign in to comment.