Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -164,11 +164,18 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa // Our current device is still valid. // Our current device is still valid. return; return; } } mLastDevice = null; for (CachedBluetoothDevice device : getDevices()) { for (CachedBluetoothDevice device : getDevices()) { if (device.isConnected()) { if (device.isConnected()) { mLastDevice = device; mLastDevice = device; } } } } if (mLastDevice == null && mConnectionState == BluetoothAdapter.STATE_CONNECTED) { // If somehow we think we are connected, but have no connected devices, we aren't // connected. mConnectionState = BluetoothAdapter.STATE_DISCONNECTED; mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } } } @Override @Override Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -164,11 +164,18 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa // Our current device is still valid. // Our current device is still valid. return; return; } } mLastDevice = null; for (CachedBluetoothDevice device : getDevices()) { for (CachedBluetoothDevice device : getDevices()) { if (device.isConnected()) { if (device.isConnected()) { mLastDevice = device; mLastDevice = device; } } } } if (mLastDevice == null && mConnectionState == BluetoothAdapter.STATE_CONNECTED) { // If somehow we think we are connected, but have no connected devices, we aren't // connected. mConnectionState = BluetoothAdapter.STATE_DISCONNECTED; mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } } } @Override @Override Loading