Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java +8 −8 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothAdapter#STATE_ON}, * {@link android.bluetooth.BluetoothAdapter#STATE_TURNING_OFF}. */ void onBluetoothStateChanged(int bluetoothState); default void onBluetoothStateChanged(int bluetoothState) {} /** * It will be called when the local Bluetooth adapter has started Loading @@ -43,7 +43,7 @@ public interface BluetoothCallback { * * @param started indicate the current process is started or finished. */ void onScanningStateChanged(boolean started); default void onScanningStateChanged(boolean started) {} /** * It will be called in following situations: Loading @@ -54,7 +54,7 @@ public interface BluetoothCallback { * * @param cachedDevice the Bluetooth device. */ void onDeviceAdded(CachedBluetoothDevice cachedDevice); default void onDeviceAdded(CachedBluetoothDevice cachedDevice) {} /** * It will be called when a remote device that was Loading @@ -63,7 +63,7 @@ public interface BluetoothCallback { * * @param cachedDevice the Bluetooth device. */ void onDeviceDeleted(CachedBluetoothDevice cachedDevice); default void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {} /** * It will be called when bond state of a remote device is changed. Loading @@ -75,7 +75,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothDevice#BOND_BONDING}, * {@link android.bluetooth.BluetoothDevice#BOND_BONDED}. */ void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState); default void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) {} /** * It will be called in following situations: Loading @@ -91,7 +91,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothAdapter#STATE_CONNECTED}, * {@link android.bluetooth.BluetoothAdapter#STATE_DISCONNECTING}. */ void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state); default void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {} /** * It will be called when device been set as active for {@code bluetoothProfile} Loading @@ -103,7 +103,7 @@ public interface BluetoothCallback { * @param activeDevice the active Bluetooth device. * @param bluetoothProfile the profile of active Bluetooth device. */ void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile); default void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} /** * It will be called in following situations: Loading @@ -113,7 +113,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothHeadset#ACTION_AUDIO_STATE_CHANGED} * {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} */ void onAudioModeChanged(); default void onAudioModeChanged() {} /** * It will be called when one of the bluetooth device profile connection state is changed. Loading packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java +0 −15 Original line number Diff line number Diff line Loading @@ -598,21 +598,6 @@ public class KeyboardUI extends SystemUI implements InputManager.OnTabletModeCha mHandler.obtainMessage(MSG_ON_DEVICE_BOND_STATE_CHANGED, bondState, 0, cachedDevice).sendToTarget(); } @Override public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { } @Override public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { } @Override public void onScanningStateChanged(boolean started) { } @Override public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { } @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } @Override public void onAudioModeChanged() { } } private final class BluetoothErrorListener implements BluetoothUtils.ErrorListener { Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +0 −11 Original line number Diff line number Diff line Loading @@ -238,11 +238,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } @Override public void onScanningStateChanged(boolean started) { // Don't care. } @Override public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { cachedDevice.registerCallback(this); Loading Loading @@ -277,12 +272,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} @Override public void onAudioModeChanged() {} private ActuallyCachedState getCachedState(CachedBluetoothDevice device) { ActuallyCachedState state = mCachedState.get(device); if (state == null) { Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java +8 −8 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothAdapter#STATE_ON}, * {@link android.bluetooth.BluetoothAdapter#STATE_TURNING_OFF}. */ void onBluetoothStateChanged(int bluetoothState); default void onBluetoothStateChanged(int bluetoothState) {} /** * It will be called when the local Bluetooth adapter has started Loading @@ -43,7 +43,7 @@ public interface BluetoothCallback { * * @param started indicate the current process is started or finished. */ void onScanningStateChanged(boolean started); default void onScanningStateChanged(boolean started) {} /** * It will be called in following situations: Loading @@ -54,7 +54,7 @@ public interface BluetoothCallback { * * @param cachedDevice the Bluetooth device. */ void onDeviceAdded(CachedBluetoothDevice cachedDevice); default void onDeviceAdded(CachedBluetoothDevice cachedDevice) {} /** * It will be called when a remote device that was Loading @@ -63,7 +63,7 @@ public interface BluetoothCallback { * * @param cachedDevice the Bluetooth device. */ void onDeviceDeleted(CachedBluetoothDevice cachedDevice); default void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {} /** * It will be called when bond state of a remote device is changed. Loading @@ -75,7 +75,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothDevice#BOND_BONDING}, * {@link android.bluetooth.BluetoothDevice#BOND_BONDED}. */ void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState); default void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) {} /** * It will be called in following situations: Loading @@ -91,7 +91,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothAdapter#STATE_CONNECTED}, * {@link android.bluetooth.BluetoothAdapter#STATE_DISCONNECTING}. */ void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state); default void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {} /** * It will be called when device been set as active for {@code bluetoothProfile} Loading @@ -103,7 +103,7 @@ public interface BluetoothCallback { * @param activeDevice the active Bluetooth device. * @param bluetoothProfile the profile of active Bluetooth device. */ void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile); default void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} /** * It will be called in following situations: Loading @@ -113,7 +113,7 @@ public interface BluetoothCallback { * {@link android.bluetooth.BluetoothHeadset#ACTION_AUDIO_STATE_CHANGED} * {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} */ void onAudioModeChanged(); default void onAudioModeChanged() {} /** * It will be called when one of the bluetooth device profile connection state is changed. Loading
packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java +0 −15 Original line number Diff line number Diff line Loading @@ -598,21 +598,6 @@ public class KeyboardUI extends SystemUI implements InputManager.OnTabletModeCha mHandler.obtainMessage(MSG_ON_DEVICE_BOND_STATE_CHANGED, bondState, 0, cachedDevice).sendToTarget(); } @Override public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { } @Override public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { } @Override public void onScanningStateChanged(boolean started) { } @Override public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { } @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { } @Override public void onAudioModeChanged() { } } private final class BluetoothErrorListener implements BluetoothUtils.ErrorListener { Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +0 −11 Original line number Diff line number Diff line Loading @@ -238,11 +238,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } @Override public void onScanningStateChanged(boolean started) { // Don't care. } @Override public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { cachedDevice.registerCallback(this); Loading Loading @@ -277,12 +272,6 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {} @Override public void onAudioModeChanged() {} private ActuallyCachedState getCachedState(CachedBluetoothDevice device) { ActuallyCachedState state = mCachedState.get(device); if (state == null) { Loading