Merge "Check null BT profile to prevent crash" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-04-20 07:43:49 +00:00
committed by Android (Google) Code Review

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.isProfileReady()) { if (profile != null && !profile.isProfileReady()) {
continue; continue;
} }
SwitchPreference pref = mProfilesContainer.findPreference( SwitchPreference pref = mProfilesContainer.findPreference(