From f36c88df114d69ddb5143167642af5f5d493257a Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Tue, 22 Sep 2015 13:58:56 -0700 Subject: Bluetooth: Remove notification once device is bonded This change removes the pairing notification once the bonding process is successfully completed. This scenario is specific to the cases where external apps set the Pin Key while bonding and the pairing popups or the notifications that are generated by the Settings apk need to be removed at the end of successful pairing or a failed bond. CRs-Fixed: 914262 Change-Id: I11ce77e257dcc957d7074b544da777dbdba0b3b1 --- src/com/android/settings/bluetooth/BluetoothPairingRequest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/android/settings') diff --git a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java index 5290538..71d6364 100644 --- a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java @@ -122,7 +122,8 @@ public final class BluetoothPairingRequest extends BroadcastReceiver { int oldState = intent.getIntExtra(BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE, BluetoothDevice.ERROR); if((oldState == BluetoothDevice.BOND_BONDING) && - (bondState == BluetoothDevice.BOND_NONE)) { + (bondState == BluetoothDevice.BOND_NONE || + bondState == BluetoothDevice.BOND_BONDED)) { // Remove the notification NotificationManager manager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); -- cgit v1.1