am eb701df8: Merge "Cleanup references when turning BT off." into ics-mr1
* commit 'eb701df88cb3027d6323f9e2607cbe4d5ca93ac2': Cleanup references when turning BT off.
This commit is contained in:
@@ -2390,16 +2390,18 @@ public class BluetoothService extends IBluetooth.Stub {
|
||||
}
|
||||
|
||||
BluetoothDeviceProfileState addProfileState(String address, boolean setTrust) {
|
||||
BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
|
||||
if (state != null) return state;
|
||||
|
||||
state = new BluetoothDeviceProfileState(mContext, address, this, mA2dpService, setTrust);
|
||||
BluetoothDeviceProfileState state =
|
||||
new BluetoothDeviceProfileState(mContext, address, this, mA2dpService, setTrust);
|
||||
mDeviceProfileState.put(address, state);
|
||||
state.start();
|
||||
return state;
|
||||
}
|
||||
|
||||
void removeProfileState(String address) {
|
||||
BluetoothDeviceProfileState state = mDeviceProfileState.get(address);
|
||||
if (state == null) return;
|
||||
|
||||
state.quit();
|
||||
mDeviceProfileState.remove(address);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user