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

Commit 0e28941d authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato Committed by Android Build Coastguard Worker
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.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cc2db85c538278a8f18767f76320fb5e885460ab)
Merged-In: I0a3b2562f980ffd4c64adcf59d968651b70ec1d5
Change-Id: I0a3b2562f980ffd4c64adcf59d968651b70ec1d5
parent ad217643
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