Fix NPE in Bluetooth Settings.

Bug: 230347816
Test: Manual
Change-Id: I210ce81217466897c59509a31fb53d57eed71118
This commit is contained in:
Ben Murdoch
2022-04-25 18:40:54 +00:00
parent 5d218d9fa4
commit cab2b2c4d0

View File

@@ -479,7 +479,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
@Override @Override
protected void refresh() { protected void refresh() {
for (LocalBluetoothProfile profile : getProfiles()) { for (LocalBluetoothProfile profile : getProfiles()) {
if (profile != null && !profile.isProfileReady()) { if (profile == null || !profile.isProfileReady()) {
continue; continue;
} }
SwitchPreference pref = mProfilesContainer.findPreference( SwitchPreference pref = mProfilesContainer.findPreference(