diff options
author | Hemant Gupta <hemantg@codeaurora.org> | 2015-09-22 13:58:56 -0700 |
---|---|---|
committer | Nitin Arora <niarora@codeaurora.org> | 2015-10-13 09:59:29 -0700 |
commit | f36c88df114d69ddb5143167642af5f5d493257a (patch) | |
tree | 095e683a04876b2c9b148a17d3542adbdab48e14 /src/com/android/settings | |
parent | bcf069ed68d2c8350498b6c9e664bfb7dc0daf76 (diff) | |
download | packages_apps_Settings-f36c88df114d69ddb5143167642af5f5d493257a.zip packages_apps_Settings-f36c88df114d69ddb5143167642af5f5d493257a.tar.gz packages_apps_Settings-f36c88df114d69ddb5143167642af5f5d493257a.tar.bz2 |
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
Diffstat (limited to 'src/com/android/settings')
-rw-r--r-- | src/com/android/settings/bluetooth/BluetoothPairingRequest.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); |