Loading core/java/android/server/BluetoothService.java +17 −0 Original line number Diff line number Diff line Loading @@ -676,6 +676,10 @@ public class BluetoothService extends IBluetooth.Stub { removeProfileState(address); } // HID is handled by BluetoothService, other profiles // will be handled by their respective services. setInitialInputDevicePriority(mAdapter.getRemoteDevice(address), state); if (DBG) log(address + " bond state " + oldState + " -> " + state + " (" + reason + ")"); Intent intent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); Loading Loading @@ -1347,6 +1351,19 @@ public class BluetoothService extends IBluetooth.Stub { handleInputDeviceStateChange(device, state); } private void setInitialInputDevicePriority(BluetoothDevice device, int state) { switch (state) { case BluetoothDevice.BOND_BONDED: if (getInputDevicePriority(device) == BluetoothInputDevice.PRIORITY_UNDEFINED) { setInputDevicePriority(device, BluetoothInputDevice.PRIORITY_ON); } break; case BluetoothDevice.BOND_NONE: setInputDevicePriority(device, BluetoothInputDevice.PRIORITY_UNDEFINED); break; } } /*package*/ boolean isRemoteDeviceInCache(String address) { return (mDeviceProperties.get(address) != null); } Loading Loading
core/java/android/server/BluetoothService.java +17 −0 Original line number Diff line number Diff line Loading @@ -676,6 +676,10 @@ public class BluetoothService extends IBluetooth.Stub { removeProfileState(address); } // HID is handled by BluetoothService, other profiles // will be handled by their respective services. setInitialInputDevicePriority(mAdapter.getRemoteDevice(address), state); if (DBG) log(address + " bond state " + oldState + " -> " + state + " (" + reason + ")"); Intent intent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); Loading Loading @@ -1347,6 +1351,19 @@ public class BluetoothService extends IBluetooth.Stub { handleInputDeviceStateChange(device, state); } private void setInitialInputDevicePriority(BluetoothDevice device, int state) { switch (state) { case BluetoothDevice.BOND_BONDED: if (getInputDevicePriority(device) == BluetoothInputDevice.PRIORITY_UNDEFINED) { setInputDevicePriority(device, BluetoothInputDevice.PRIORITY_ON); } break; case BluetoothDevice.BOND_NONE: setInputDevicePriority(device, BluetoothInputDevice.PRIORITY_UNDEFINED); break; } } /*package*/ boolean isRemoteDeviceInCache(String address) { return (mDeviceProperties.get(address) != null); } Loading