Stop scanning as soon as device is picked in the device picker.

This improves OPP transfer time by a couple of seconds.

Change-Id: I40e8f092ca3950a2d180b78f07f1cc717f2daaf6
This commit is contained in:
Jaikumar Ganesh
2010-03-25 14:21:10 -07:00
parent 98d55daeea
commit cdc5e6eea2

View File

@@ -230,6 +230,7 @@ public class BluetoothSettings extends PreferenceActivity
CachedBluetoothDevice device = btPreference.getCachedDevice(); CachedBluetoothDevice device = btPreference.getCachedDevice();
mSelectedDevice = device.getDevice(); mSelectedDevice = device.getDevice();
mLocalManager.stopScanning();
mLocalManager.persistSelectedDeviceInPicker(mSelectedDevice.getAddress()); mLocalManager.persistSelectedDeviceInPicker(mSelectedDevice.getAddress());
if ((device.getBondState() == BluetoothDevice.BOND_BONDED) || if ((device.getBondState() == BluetoothDevice.BOND_BONDED) ||
(mNeedAuth == false)) { (mNeedAuth == false)) {