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

Commit cc2db85c authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Fix display disconnected race condition in NavigationBarModule

If the display was disconnected while the NavigationBarComponent was being created, PerDisplayRepository<SysUiState> would return null for that display, causing dagger to throw an exception (As the return type is defined as not null).

This is usually not an issue as new modules are written in kotlin that enforces null safety, but as this is still in Java the null case was not being handled correctly.

If the display specific "SysUIState" is null, the default display SysUIState is returned from the module (but it will not be used regardles as the navigation bar won't be instantiated, as the display is not there anymore)

Bug: 425702773
Flag: com.android.systemui.shade_window_goes_around
Test: Not really testable, as it's a race condition that happens only if the display is disconnected while the component is being instantiated.
Change-Id: I0a3b2562f980ffd4c64adcf59d968651b70ec1d5
parent 07f0a406
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment