Loading src/com/android/settings/bluetooth/A2dpProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ final class A2dpProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } boolean isA2dpPlaying() { if (mService == null) return false; List<BluetoothDevice> sinks = mService.getConnectedDevices(); Loading src/com/android/settings/bluetooth/CachedBluetoothDevice.java +8 −0 Original line number Diff line number Diff line Loading @@ -514,8 +514,16 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { dispatchAttributesChanged(); } // Clear service priority of Hid, A2DP and Headset profiles on unbond private void clearProfilePriorities() { for (LocalBluetoothProfile profile : mProfiles) { profile.setUnbonded(mDevice); } } void onBondingStateChanged(int bondState) { if (bondState == BluetoothDevice.BOND_NONE) { clearProfilePriorities(); mProfiles.clear(); mConnectAfterPairing = false; // cancel auto-connect setPhonebookPermissionChoice(PHONEBOOK_ACCESS_UNKNOWN); Loading src/com/android/settings/bluetooth/HeadsetProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,12 @@ final class HeadsetProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } public List<BluetoothDevice> getConnectedDevices() { if (mService == null) return new ArrayList<BluetoothDevice>(0); return mService.getDevicesMatchingConnectionStates( Loading src/com/android/settings/bluetooth/HidProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,12 @@ final class HidProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } public String toString() { return NAME; } Loading src/com/android/settings/bluetooth/LocalBluetoothProfile.java +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ interface LocalBluetoothProfile { void setPreferred(BluetoothDevice device, boolean preferred); void setUnbonded(BluetoothDevice device); boolean isProfileReady(); /** Display order for device profile settings. */ Loading Loading
src/com/android/settings/bluetooth/A2dpProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ final class A2dpProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } boolean isA2dpPlaying() { if (mService == null) return false; List<BluetoothDevice> sinks = mService.getConnectedDevices(); Loading
src/com/android/settings/bluetooth/CachedBluetoothDevice.java +8 −0 Original line number Diff line number Diff line Loading @@ -514,8 +514,16 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { dispatchAttributesChanged(); } // Clear service priority of Hid, A2DP and Headset profiles on unbond private void clearProfilePriorities() { for (LocalBluetoothProfile profile : mProfiles) { profile.setUnbonded(mDevice); } } void onBondingStateChanged(int bondState) { if (bondState == BluetoothDevice.BOND_NONE) { clearProfilePriorities(); mProfiles.clear(); mConnectAfterPairing = false; // cancel auto-connect setPhonebookPermissionChoice(PHONEBOOK_ACCESS_UNKNOWN); Loading
src/com/android/settings/bluetooth/HeadsetProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,12 @@ final class HeadsetProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } public List<BluetoothDevice> getConnectedDevices() { if (mService == null) return new ArrayList<BluetoothDevice>(0); return mService.getDevicesMatchingConnectionStates( Loading
src/com/android/settings/bluetooth/HidProfile.java +6 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,12 @@ final class HidProfile implements LocalBluetoothProfile { } } public void setUnbonded(BluetoothDevice device) { if (mService == null) return; mService.setPriority(device, BluetoothProfile.PRIORITY_UNDEFINED); } public String toString() { return NAME; } Loading
src/com/android/settings/bluetooth/LocalBluetoothProfile.java +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ interface LocalBluetoothProfile { void setPreferred(BluetoothDevice device, boolean preferred); void setUnbonded(BluetoothDevice device); boolean isProfileReady(); /** Display order for device profile settings. */ Loading