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

Skip to content
Commit 38b2e957 authored by Sal Savage's avatar Sal Savage
Browse files

Resolve NPE in getConnectionState()

This change tactically addresses a potential NPE on a equals() call using
mCurrentDevice. If we're disconnecting when getConnectedState() is
called then there's a concurrency bug that could allow us to use
mCurrentDevice when its been set to null in the state machine.

Rather than refactor the code at this time, the best way to handle this
is to null check the input (which won't change) and call equals() on it.

Tag: #stability
Bug: 170919518
Test: atest BluetoothInstrumentationTests
Change-Id: If02192180fb07fd2d70899b626c3a81a4b33a0a2
parent 8496b3a4
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