diff options
| author | 2011-06-27 18:38:27 -0700 | |
|---|---|---|
| committer | 2011-06-27 18:38:27 -0700 | |
| commit | 531b95f12c2114d71c165abcd16c20a37d60ebc9 (patch) | |
| tree | a56c8aa4cc38c19a148d5f3f33968898d54d5368 | |
| parent | 32d56ee70c506ad6ac66806cc9acfc32481d45dd (diff) | |
| parent | c73dd732c962238330cc2e5538a88bffbbb40fe8 (diff) | |
Merge "Fix crash while device is pairing / unpairing."
| -rw-r--r-- | core/java/android/server/BluetoothBondState.java | 8 | ||||
| -rwxr-xr-x | core/java/android/server/BluetoothService.java | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/server/BluetoothBondState.java b/core/java/android/server/BluetoothBondState.java index 5fa8836c1d9c..76e78858e029 100644 --- a/core/java/android/server/BluetoothBondState.java +++ b/core/java/android/server/BluetoothBondState.java @@ -89,7 +89,12 @@ class BluetoothBondState { return mPendingOutgoingBonding; } - public synchronized void loadBondState() { + public synchronized void initBondState() { + getProfileProxy(); + loadBondState(); + } + + private void loadBondState() { if (mService.getBluetoothStateInternal() != BluetoothAdapter.STATE_TURNING_ON) { return; @@ -108,7 +113,6 @@ class BluetoothBondState { mState.put(mService.getAddressFromObjectPath(device).toUpperCase(), BluetoothDevice.BOND_BONDED); } - getProfileProxy(); } public synchronized void setBondState(String address, int state) { diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index 7f47ebcbcc90..b5ae298f36e6 100755 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -570,7 +570,7 @@ public class BluetoothService extends IBluetooth.Stub { mIsDiscovering = false; mBondState.readAutoPairingData(); - mBondState.loadBondState(); + mBondState.initBondState(); initProfileState(); // This should be the last step of the the enable thread. |