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

Commit 5b86fe8f authored by Winson Chung's avatar Winson Chung
Browse files

Fix case where we were still handling broadcasts while switching bars

- We reset the nav bar reference after the view is destroyed while
  being recreated, and we don't actually need to update the old
  bar

Bug: 162213184
Test: Switch users and verify we don't handle broadcast while
      there is no nav bar
Change-Id: Ibe1bc0c04d4bb653aaca0b5f51485aeca4f80441
parent 8a2c8295
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1428,6 +1428,9 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (mNavigationBarView == null) {
                return;
            }
            String action = intent.getAction();
            if (Intent.ACTION_SCREEN_OFF.equals(action)
                    || Intent.ACTION_SCREEN_ON.equals(action)) {