Loading core/java/android/bluetooth/BluetoothAdapter.java +9 −6 Original line number Diff line number Diff line Loading @@ -2045,12 +2045,15 @@ public final class BluetoothAdapter { public void onBluetoothServiceDown() { if (VDBG) Log.d(TAG, "onBluetoothServiceDown: " + mService); try { mServiceLock.writeLock().lock(); mService = null; if (mLeScanClients != null) mLeScanClients.clear(); if (sBluetoothLeAdvertiser != null) sBluetoothLeAdvertiser.cleanup(); if (sBluetoothLeScanner != null) sBluetoothLeScanner.cleanup(); } finally { mServiceLock.writeLock().unlock(); } synchronized (mProxyServiceStateCallbacks) { for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){ Loading services/core/java/com/android/server/BluetoothManagerService.java +20 −14 Original line number Diff line number Diff line Loading @@ -1457,6 +1457,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { BluetoothAdapter.STATE_OFF); sendBluetoothServiceDownCallback(); try { mBluetoothLock.writeLock().lock(); if (mBluetooth != null) { mBluetooth = null; Loading @@ -1464,7 +1465,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mContext.unbindService(mConnection); } mBluetoothGatt = null; } finally { mBluetoothLock.writeLock().unlock(); } SystemClock.sleep(100); Loading Loading @@ -1765,6 +1768,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { sendBluetoothServiceDownCallback(); try { mBluetoothLock.writeLock().lock(); if (mBluetooth != null) { mBluetooth = null; Loading @@ -1772,7 +1776,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mContext.unbindService(mConnection); } mBluetoothGatt = null; } finally { mBluetoothLock.writeLock().unlock(); } mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE); mState = BluetoothAdapter.STATE_OFF; Loading Loading
core/java/android/bluetooth/BluetoothAdapter.java +9 −6 Original line number Diff line number Diff line Loading @@ -2045,12 +2045,15 @@ public final class BluetoothAdapter { public void onBluetoothServiceDown() { if (VDBG) Log.d(TAG, "onBluetoothServiceDown: " + mService); try { mServiceLock.writeLock().lock(); mService = null; if (mLeScanClients != null) mLeScanClients.clear(); if (sBluetoothLeAdvertiser != null) sBluetoothLeAdvertiser.cleanup(); if (sBluetoothLeScanner != null) sBluetoothLeScanner.cleanup(); } finally { mServiceLock.writeLock().unlock(); } synchronized (mProxyServiceStateCallbacks) { for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){ Loading
services/core/java/com/android/server/BluetoothManagerService.java +20 −14 Original line number Diff line number Diff line Loading @@ -1457,6 +1457,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { BluetoothAdapter.STATE_OFF); sendBluetoothServiceDownCallback(); try { mBluetoothLock.writeLock().lock(); if (mBluetooth != null) { mBluetooth = null; Loading @@ -1464,7 +1465,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mContext.unbindService(mConnection); } mBluetoothGatt = null; } finally { mBluetoothLock.writeLock().unlock(); } SystemClock.sleep(100); Loading Loading @@ -1765,6 +1768,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { sendBluetoothServiceDownCallback(); try { mBluetoothLock.writeLock().lock(); if (mBluetooth != null) { mBluetooth = null; Loading @@ -1772,7 +1776,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mContext.unbindService(mConnection); } mBluetoothGatt = null; } finally { mBluetoothLock.writeLock().unlock(); } mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE); mState = BluetoothAdapter.STATE_OFF; Loading