Loading core/java/android/bluetooth/BluetoothDeviceProfileState.java +1 −0 Original line number Diff line number Diff line Loading @@ -773,6 +773,7 @@ public final class BluetoothDeviceProfileState extends HierarchicalStateMachine case CONNECT_HFP_INCOMING: transitionTo(mIncomingHandsfree); break; case CONNECT_A2DP_INCOMING: transitionTo(mIncomingA2dp); Loading core/java/android/server/BluetoothService.java +12 −0 Original line number Diff line number Diff line Loading @@ -385,11 +385,23 @@ public class BluetoothService extends IBluetooth.Stub { // Allow 3 seconds for profiles to gracefully disconnect // TODO: Introduce a callback mechanism so that each profile can notify // BluetoothService when it is done shutting down disconnectDevices(); mHandler.sendMessageDelayed( mHandler.obtainMessage(MESSAGE_FINISH_DISABLE, saveSetting ? 1 : 0, 0), 3000); return true; } private synchronized void disconnectDevices() { // Disconnect devices handled by BluetoothService. for (BluetoothDevice device: getConnectedInputDevices()) { disconnectInputDevice(device); } for (BluetoothDevice device: getConnectedPanDevices()) { disconnectPanDevice(device); } } private synchronized void finishDisable(boolean saveSetting) { if (mBluetoothState != BluetoothAdapter.STATE_TURNING_OFF) { Loading Loading
core/java/android/bluetooth/BluetoothDeviceProfileState.java +1 −0 Original line number Diff line number Diff line Loading @@ -773,6 +773,7 @@ public final class BluetoothDeviceProfileState extends HierarchicalStateMachine case CONNECT_HFP_INCOMING: transitionTo(mIncomingHandsfree); break; case CONNECT_A2DP_INCOMING: transitionTo(mIncomingA2dp); Loading
core/java/android/server/BluetoothService.java +12 −0 Original line number Diff line number Diff line Loading @@ -385,11 +385,23 @@ public class BluetoothService extends IBluetooth.Stub { // Allow 3 seconds for profiles to gracefully disconnect // TODO: Introduce a callback mechanism so that each profile can notify // BluetoothService when it is done shutting down disconnectDevices(); mHandler.sendMessageDelayed( mHandler.obtainMessage(MESSAGE_FINISH_DISABLE, saveSetting ? 1 : 0, 0), 3000); return true; } private synchronized void disconnectDevices() { // Disconnect devices handled by BluetoothService. for (BluetoothDevice device: getConnectedInputDevices()) { disconnectInputDevice(device); } for (BluetoothDevice device: getConnectedPanDevices()) { disconnectPanDevice(device); } } private synchronized void finishDisable(boolean saveSetting) { if (mBluetoothState != BluetoothAdapter.STATE_TURNING_OFF) { Loading