From a4503c5b8b90b3e9c9124cd596c6f4220a10d3a7 Mon Sep 17 00:00:00 2001 From: Jack He Date: Tue, 11 Jul 2017 12:04:01 -0700 Subject: [PATCH] Bluetooth: mLocalAdapter should never be null * mLocalAdapter should never be null * We should crash if it is ever null Bug: 63442969 Test: make, pair Bluetooth device Change-Id: If98f9ea0762927eb57d00224b62abf24bbec69ba --- .../android/settings/bluetooth/BluetoothPairingDetail.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDetail.java b/src/com/android/settings/bluetooth/BluetoothPairingDetail.java index 6545ed1f945..d7b86c5869c 100644 --- a/src/com/android/settings/bluetooth/BluetoothPairingDetail.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingDetail.java @@ -70,10 +70,8 @@ public class BluetoothPairingDetail extends DeviceListPreferenceFragment impleme public void onStart() { super.onStart(); - if (mLocalAdapter != null) { - updateContent(mLocalAdapter.getBluetoothState()); - mAvailableDevicesCategory.setProgress(mLocalAdapter.isDiscovering()); - } + updateContent(mLocalAdapter.getBluetoothState()); + mAvailableDevicesCategory.setProgress(mLocalAdapter.isDiscovering()); } @Override