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

Commit 2a1792ea authored by Winson Chung's avatar Winson Chung
Browse files

Skip updating nav bar if it was destroyed

- Since device config updates are posted, there can be
  a queued update after we remove the nav bar, which
  will reference a null bar

Bug: 210713030
Test: Haven't been able to trigger the actual NPE
Change-Id: I05f1cb6e2a97808ad05b5aaaa046689df04995e1
parent b70d7493
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -440,9 +440,11 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
                        mHomeButtonLongPressDurationMs = Optional.of(
                            properties.getLong(HOME_BUTTON_LONG_PRESS_DURATION_MS, 0)
                        ).filter(duration -> duration != 0);
                        if (mNavigationBarView != null) {
                            reconfigureHomeLongClick();
                        }
                    }
                }
            };

    private final DeviceProvisionedController.DeviceProvisionedListener mUserSetupListener =