Merge "Set BT to proper scan mode." into oc-mr1-dev
diff --git a/src/com/android/car/settings/bluetooth/BluetoothSettingsFragment.java b/src/com/android/car/settings/bluetooth/BluetoothSettingsFragment.java
index e35ecf8..2027b70 100644
--- a/src/com/android/car/settings/bluetooth/BluetoothSettingsFragment.java
+++ b/src/com/android/car/settings/bluetooth/BluetoothSettingsFragment.java
@@ -147,6 +147,7 @@
mBluetoothSwitch.setChecked(mLocalAdapter.isEnabled());
if (mLocalAdapter.isEnabled()) {
setProgressBarVisible(true);
+ mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
mLocalAdapter.startScanning(true);
if (mViewSwitcher.getCurrentView() != mSwipeRefreshLayout) {
mViewSwitcher.showPrevious();
@@ -168,6 +169,7 @@
}
getActivity().unregisterReceiver(mBroadcastReceiver);
mDeviceAdapter.stop();
+ mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE);
mLocalManager.setForegroundActivity(null);
mLocalAdapter.stopScanning();
mLocalManager.getEventManager().unregisterCallback(this);