Loading src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont public int getAvailabilityStatus() { final boolean advancedEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI, SettingsUIDeviceConfig.BT_ADVANCED_HEADER_ENABLED, true); final boolean untetheredHeadset = BluetoothUtils.getBooleanMetaData( final boolean untetheredHeadset = mCachedDevice != null && BluetoothUtils.getBooleanMetaData( mCachedDevice.getDevice(), BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET); return advancedEnabled && untetheredHeadset ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; } Loading src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.bluetooth.BluetoothDevice; import android.content.Context; import android.os.Bundle; import android.provider.DeviceConfig; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; Loading Loading @@ -107,12 +108,13 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment mDeviceAddress = getArguments().getString(KEY_DEVICE_ADDRESS); mManager = getLocalBluetoothManager(context); mCachedDevice = getCachedDevice(mDeviceAddress); super.onAttach(context); if (mCachedDevice == null) { // Close this page if device is null with invalid device mac address Log.w(TAG, "onAttach() CachedDevice is null!"); finish(); return; } super.onAttach(context); use(AdvancedBluetoothDetailsHeaderController.class).init(mCachedDevice); final BluetoothFeatureProvider featureProvider = FeatureFactory.getFactory( Loading Loading
src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont public int getAvailabilityStatus() { final boolean advancedEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI, SettingsUIDeviceConfig.BT_ADVANCED_HEADER_ENABLED, true); final boolean untetheredHeadset = BluetoothUtils.getBooleanMetaData( final boolean untetheredHeadset = mCachedDevice != null && BluetoothUtils.getBooleanMetaData( mCachedDevice.getDevice(), BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET); return advancedEnabled && untetheredHeadset ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; } Loading
src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.bluetooth.BluetoothDevice; import android.content.Context; import android.os.Bundle; import android.provider.DeviceConfig; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; Loading Loading @@ -107,12 +108,13 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment mDeviceAddress = getArguments().getString(KEY_DEVICE_ADDRESS); mManager = getLocalBluetoothManager(context); mCachedDevice = getCachedDevice(mDeviceAddress); super.onAttach(context); if (mCachedDevice == null) { // Close this page if device is null with invalid device mac address Log.w(TAG, "onAttach() CachedDevice is null!"); finish(); return; } super.onAttach(context); use(AdvancedBluetoothDetailsHeaderController.class).init(mCachedDevice); final BluetoothFeatureProvider featureProvider = FeatureFactory.getFactory( Loading