Merge "Add null check for mNavigationBarFrame"

This commit is contained in:
TreeHugger Robot
2022-02-07 17:00:10 +00:00
committed by Android (Google) Code Review

View File

@@ -531,12 +531,14 @@ final class NavigationBarController {
if (drawLegacyNavigationBarBackground != mDrawLegacyNavigationBarBackground) {
mDrawLegacyNavigationBarBackground = drawLegacyNavigationBarBackground;
if (mDrawLegacyNavigationBarBackground) {
mNavigationBarFrame.setBackgroundColor(Color.BLACK);
} else {
mNavigationBarFrame.setBackground(null);
if (mNavigationBarFrame != null) {
if (mDrawLegacyNavigationBarBackground) {
mNavigationBarFrame.setBackgroundColor(Color.BLACK);
} else {
mNavigationBarFrame.setBackground(null);
}
scheduleRelayout();
}
scheduleRelayout();
onSystemBarAppearanceChanged(mAppearance);
}
return drawLegacyNavigationBarBackground;