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
Loading
Please register or sign in to comment