Add null check for mNavigationBarFrame

This may not exist at this point (or at all depending on the device
configuration)

Change-Id: Ida9b5f4eadfd2620d7b74171268cf266f77f7b3d
Test: manual - bring up the keyboard on a TV
Fix: 218228687
This commit is contained in:
Robin Lee
2022-02-07 10:19:28 +00:00
parent ee435ebcb2
commit a246b947d4

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;