diff options
| author | Matthew Xie <mattx@google.com> | 2011-06-25 21:47:07 -0700 |
|---|---|---|
| committer | Matthew Xie <mattx@google.com> | 2011-07-07 12:43:27 -0700 |
| commit | a0c680393f2dd03a937c598b2cb9abf98a58152c (patch) | |
| tree | d8d240310c4a4d31d9215174643a95da016bc0c0 /core/java/android/server/BluetoothBondState.java | |
| parent | b75a798471342da5e4624048c5516773dfecf4ca (diff) | |
| download | frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.zip frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.tar.gz frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.tar.bz2 | |
Incoming Bluetooth Connection requests - dialog.
This sends the intents to the Settings app to show
the dialogs for the incoming connection requests.
Includes down merged contributions from Jaikumar Ganesh.
Change-Id: Ic8b857aad3554315aae39a0e871eb94d0ac98a91
Diffstat (limited to 'core/java/android/server/BluetoothBondState.java')
| -rw-r--r-- | core/java/android/server/BluetoothBondState.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/server/BluetoothBondState.java b/core/java/android/server/BluetoothBondState.java index 76e7885..75f38f9 100644 --- a/core/java/android/server/BluetoothBondState.java +++ b/core/java/android/server/BluetoothBondState.java @@ -121,6 +121,8 @@ class BluetoothBondState { /** reason is ignored unless state == BOND_NOT_BONDED */ public synchronized void setBondState(String address, int state, int reason) { + if (DBG) Log.d(TAG, "setBondState " + "address" + " " + state + "reason: " + reason); + int oldState = getBondState(address); if (oldState == state) { return; @@ -136,8 +138,10 @@ class BluetoothBondState { if (state == BluetoothDevice.BOND_BONDED) { mService.addProfileState(address); - } else if (state == BluetoothDevice.BOND_NONE) { - mService.removeProfileState(address); + } else if (state == BluetoothDevice.BOND_BONDING) { + if (mA2dpProxy == null || mHeadsetProxy == null) { + getProfileProxy(); + } } setProfilePriorities(address, state); @@ -240,6 +244,8 @@ class BluetoothBondState { } public synchronized void clearPinAttempts(String address) { + if (DBG) Log.d(TAG, "clearPinAttempts: " + address); + mPinAttempt.remove(address); } @@ -265,6 +271,8 @@ class BluetoothBondState { } else { newAttempt = attempt.intValue() + 1; } + if (DBG) Log.d(TAG, "attemp newAttempt: " + newAttempt); + mPinAttempt.put(address, new Integer(newAttempt)); } |
