Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a779330a authored by Merissa Mitchell's avatar Merissa Mitchell
Browse files

Fix NPE from NavbarButtonsViewController on FEATURE_PC devices.

When FEATURE_PC is enabled on a device,
DesktopNavbarButtonsViewController is instantiated. Previously,
DesktopNavbarButtonsViewController saves an internal copy of
mControllers and the mControllers field in NavbarButtonsViewController
is left unset. This was not a problem because mControllers in
NavbarButtonsViewController was not used in any code that was not
overridden by DesktopNavbarButtonsViewController.

ag/17944073 added some code that accesses mControllers in
NavbarButtonsViewController. Even though the code would be skipped for
FEATURE_PC devices (due to the TaskbarUIController check, which is
overridden by DesktopTaskbarUIController) in the end, it still caused an
NPE.

DesktopNavbarButtonsViewController does not require most of the button
updates done in NavbarButtonsViewController. Regardless, this CL
provides a workaround to avoid the NPE by setting mControllers in
NavbarButtonsViewController in FEATURE_PC devices.

Bug: 296623609
Bug: 297260211
Test: Manual; build and launch sdk_gpc emulator. Ensure that no crash
occurs

Change-Id: Ica22359b96fd0a277c575a238abb194d762e81ea
parent aa619b90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment