Fix NPE in WirelessSettings.onCreate() for SDK and non-BT devices.
Fix NPE when entering Settings app in the SDK (and for devices without Bluetooth). Also remove the "Bluetooth settings" item in addition to the Bluetooth toggle item from Wireless settings when BT is missing. Bug: 4149307 Change-Id: Iecc5960a193cf88664d3217b4d7bdbc2276dabc0
This commit is contained in:
@@ -58,7 +58,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment {
|
||||
void addPreferencesForActivity() {
|
||||
addPreferencesFromResource(R.xml.bluetooth_settings);
|
||||
|
||||
mEnabler = new BluetoothEnabler(getActivity(), mLocalAdapter,
|
||||
mEnabler = new BluetoothEnabler(getActivity(),
|
||||
(CheckBoxPreference) findPreference(KEY_BT_CHECKBOX));
|
||||
|
||||
mDiscoverableEnabler = new BluetoothDiscoverableEnabler(getActivity(),
|
||||
|
Reference in New Issue
Block a user