Introduce isDeviceClassMatched() to align BluetoothClass comparison

getBluetoothClass is nullable that caller needs paying attention to. This CL introduced a unified and safe method to BluetoothUtils to align this comparison.

Bug: 264162859
Test: atest CachedBluetoothDeviceTest
Change-Id: I740defb7bc369f659103b09643c3e37050ea8bbe
2 files changed