From cab2b2c4d083e3a159998c734ff2925c92f3f12a Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Mon, 25 Apr 2022 18:40:54 +0000 Subject: [PATCH] Fix NPE in Bluetooth Settings. Bug: 230347816 Test: Manual Change-Id: I210ce81217466897c59509a31fb53d57eed71118 --- .../settings/bluetooth/BluetoothDetailsProfilesController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java index b7f89095755..9069feabb82 100644 --- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java @@ -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(