Fix possible crash when user goes to Settings from Nearby screen.

Bug: T72528
Change-Id: I3ea00a53e930c26d337f37d5f47b315f9979fc7b