Check null BT profile to prevent crash

Bug: 229802811
Test: build pass
Change-Id: Idf9f32ec08793784fbce05d34c53cdf53cddb312
This commit is contained in:
Hugh Chen
2022-04-20 03:45:13 +00:00
parent 3c354a2d38
commit 76e230918f

View File

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