Merge "Fix NPE in Bluetooth Settings." into tm-dev

This commit is contained in:
Hugh Chen
2022-04-27 04:00:33 +00:00
committed by Android (Google) Code Review

View File

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